code: def from_file(cls, filename):
          
          try:
              with open(filename, "r") as fh:
                  return cls.from_dict(yaml.safe_load(fh))
          except Exception as exc:
              print("Error while reading TaskManager parameters from %s\n" % filename)
              raise
docs: Read the configuration parameters from the Yaml file filename.