code: def from_user_config(cls):
          
          global _USER_CONFIG_TASKMANAGER
          if _USER_CONFIG_TASKMANAGER is not None:
              return _USER_CONFIG_TASKMANAGER
  
          # Try in the current directory then in user configuration directory.
          path = os.path.join(os.getcwd(), cls.YAML_FILE)
          if not os.path.exists(path):
              path = os.path.join(cls.USER_CONFIG_DIR, cls.YAML_FILE)
  
          if not os.path.exists(path):
              raise RuntimeError(colored(
  		"\nCannot locate %s neither in current directory nor in %s\n"
                  "!!! PLEASE READ THIS: !!!\n"
                  "To use AbiPy to run jobs this file must be present\n"
                  "It provides a description of the cluster/computer you are running on\n"
                  "Examples are provided in abipy/data/managers." % (cls.YAML_FILE, path), color="red"))
  
          _USER_CONFIG_TASKMANAGER = cls.from_file(path)
          return _USER_CONFIG_TASKMANAGER
docs: Initialize the :class:`TaskManager` from the YAML file 'manager.yaml'.
          Search first in the working directory and then in the AbiPy configuration directory.
  
          Raises:
              RuntimeError if file is not found.