def find_google_fileid_tree(service, fileId):
  """Find the folder tree of a file

  Arguments:
    service: in order to use any of this library, the user needs to first build the service class using google ServiceAccountCredentials. see https://pypi.org/project/google-api-v3-helper/ or https://github.com/sbi-rviot/google_api_helper for a full example.
    fileId: id of the file you wish to get the tree for.
  """
  file = service.files().get(fileId=fileId, fields='id, name, parents').execute()
  tree = []
  parent = file.get('parents')
  if parent:
      while True:
          folder = service.files().get(
              fileId=parent[0], fields='id, name, parents').execute()
          parent = folder.get('parents')
          if parent is None:
              break
          tree.append({'id': parent[0], 'name': folder.get('name')})

  return tree