code: def _setup_cgroup_memory_limit(self, memlimit, cgroups, pid_to_kill):
          
          if memlimit is not None:
              try:
                  oomThread = oomhandler.KillProcessOnOomThread(
                      cgroups=cgroups, pid_to_kill=pid_to_kill,
                      callbackFn=self._set_termination_reason,
                      kill_process_fn=self._kill_process)
                  oomThread.start()
                  return oomThread
              except OSError as e:
                  logging.critical("OSError %s during setup of OomEventListenerThread: %s.",
                                   e.errno, e.strerror)
          return None
docs: Start memory-limit handler.
          @return None or the memory-limit handler for calling cancel()