code: def set_api_key_from_file(path, set_global=True):
      
      with open(path, 'r+b') as f:
          global api_key
          api_key = f.read().strip()
      return api_key
docs: Set the global api_key from a file path.