code: def read_worker_creds(key="credentials"):
      
      for path in CREDS_FILES:
          if not os.path.exists(path):
              continue
          contents = load_json_or_yaml(path, is_path=True, exception=None)
          if contents.get(key):
              return contents[key]
      else:
          if key == "credentials" and os.environ.get("TASKCLUSTER_ACCESS_TOKEN") and \
                  os.environ.get("TASKCLUSTER_CLIENT_ID"):
              credentials = {
                  "accessToken": os.environ["TASKCLUSTER_ACCESS_TOKEN"],
                  "clientId": os.environ["TASKCLUSTER_CLIENT_ID"],
              }
              if os.environ.get("TASKCLUSTER_CERTIFICATE"):
                  credentials['certificate'] = os.environ['TASKCLUSTER_CERTIFICATE']
              return credentials
docs: Get credentials from CREDS_FILES or the environment.
  
      This looks at the CREDS_FILES in order, and falls back to the environment.
  
      Args:
          key (str, optional): each CREDS_FILE is a json dict.  This key's value
              contains the credentials.  Defaults to 'credentials'.
  
      Returns:
          dict: the credentials found. None if no credentials found.