code: def load(cls, filename=None):
          
          if filename is None:
              LOGGER.debug("Loading default configuration.")
              with open_text(templates, "test_config.yml",
                             encoding="utf-8") as file_handle:
                  content = yaml.load(file_handle)
          else:
              LOGGER.debug("Loading custom configuration '%s'.", filename)
              try:
                  with open(filename, encoding="utf-8") as file_handle:
                      content = yaml.load(file_handle)
              except IOError as err:
                  LOGGER.error(
                      "Failed to load the custom configuration '%s'. Skipping.",
                      filename)
                  LOGGER.debug(str(err))
                  content = dict()
          return cls(content)
docs: Load a test report configuration.