daradara-corecoreinternalcgroupOn this pagecgroupset_memory_limitdef set_memory_limit()Set memory limit for Python to limits defined in the cgroup. Works with both cgroupv1 and cgroupv2.get_cpu_countdef get_cpu_count()Get current CPU count.Attempts to read from cgroup configuration, falls back to os.cpu_count()