code: def get_brain_info(brain):
      
      icon = api.get_icon(brain)
      # avoid 404 errors with these guys
      if "document_icon.gif" in icon:
          icon = ""
  
      id = api.get_id(brain)
      url = api.get_url(brain)
      title = api.get_title(brain)
      description = api.get_description(brain)
      parent = api.get_parent(brain)
      parent_title = api.get_title(parent)
      parent_url = api.get_url(parent)
  
      return {
          "id": id,
          "title": title,
          "title_or_id": title or id,
          "description": description,
          "url": url,
          "parent_title": parent_title,
          "parent_url": parent_url,
          "icon": icon,
      }
docs: Extract the brain info