code: def generate_pb_docs():
      """Generates markdown file"""
  
      print("Generating API blueprint documentation...")
      client = carla.Client("127.0.0.1", 2000)
      client.set_timeout(2.0)
      world = client.get_world()
  
      bp_dict = {}
      blueprints = [
          bp for bp in world.get_blueprint_library().filter("*")
      ]  # Returns list of all blueprints
      blueprint_ids = [
          bp.id for bp in world.get_blueprint_library().filter("*")
      ]  # Returns list of all blueprint ids
  
      # Creates a dict key = walker, static, prop, vehicle, sensor, controller; value = [bp_id, blueprint]
      for bp_id in sorted(blueprint_ids):
          bp_type = bp_id.split(".")[0]
          value = []
          for bp in blueprints:
              if bp.id == bp_id:
                  value = [bp_id, bp]
          if bp_type in bp_dict:
              bp_dict[bp_type].append(value)
          else:
              bp_dict[bp_type] = [value]
  
      # Actual documentation
      md = MarkdownFile()
      md.not_title("Blueprint Library")
      md.textn(
          "The Blueprint Library ([`carla.BlueprintLibrary`](../python_api/#carlablueprintlibrary-class)) "
          + "is a summary of all [`carla.ActorBlueprint`](../python_api/#carla.ActorBlueprint) "
          + "and its attributes ([`carla.ActorAttribute`](../python_api/#carla.ActorAttribute)) "
          + "available to the user in CARLA."
      )
  
      md.textn(
          "\nHere is an example code for printing all actor blueprints and their attributes:"
      )
      md.textn(
          md.code_block(
              "blueprints = [bp for bp in world.get_blueprint_library().filter('*')]\n"
              "for blueprint in blueprints:\n"
              "   print(blueprint.id)\n"
              "   for attr in blueprint:\n"
              "       print('  - {}'.format(attr))",
              "py",
          )
      )
      md.textn(
          "Check out the [introduction to blueprints](core_actors.md)."
      )
  
      for key, value in bp_dict.items():  # bp types, bp's
          md.title(
              3, key
          )  # Key = walker, static, controller, sensor, vehicle
          for bp in sorted(
              value
          ):  # Value = bp[0]= name bp[1]= blueprint
              md.list_pushn(bold(color(COLOR_LIST, bp[0])))  # bp name
              md.list_push(bold("Attributes:") + "\n")
              for attr in sorted(
                  bp[1], key=lambda x: x.id
              ):  # for attribute in blueprint
                  md.list_push(code(attr.id))
                  md.text(" " + parentheses(italic(str(attr.type))))
                  if attr.is_modifiable:
                      md.text(" " + sub(italic("- Modifiable")))
                  md.list_popn()
              md.list_pop()
              md.list_pop()
          md.list_pop()
      return md.data()
  
imports: import glob
  import os
  import sys
  import carla
label_desc: Use image node_id 9 for calling a global function with example usage: generate_pb_docs() and returns: md