code: def generate_vtype(vehicle):
      """Generates sumo vtype specification for a given carla vehicle.
  
      :param vehicle: carla actor (carla.Actor)
      :return: sumo vtype specifications
      """
      type_id = vehicle.type_id
  
      if type_id not in CARLA_BLUEPRINTS_SPECS:
          number_of_wheels = int(vehicle.attributes["number_of_wheels"])
          if number_of_wheels == 2:
              logging.warning(
                  """type id %s not mapped to any sumo vtype.
                  \tUsing default specification for two-wheeled vehicles: %s""",
                  type_id,
                  DEFAULT_2_WHEELED_VEHICLE,
              )
              user_specs = DEFAULT_2_WHEELED_VEHICLE
          else:
              logging.warning(
                  """type id %s not mapped to any sumo vtype.
                  \tUsing default specification for wheeled vehicles: %s""",
                  type_id,
                  DEFAULT_WHEELED_VEHICLE,
              )
              user_specs = DEFAULT_WHEELED_VEHICLE
  
      else:
          logging.info(
              "type id %s mapped to the following specifications: %s",
              type_id,
              CARLA_BLUEPRINTS_SPECS[type_id],
          )
          user_specs = CARLA_BLUEPRINTS_SPECS[type_id]
  
      specs = {
          "id": vehicle.type_id,
          "length": str(2.0 * vehicle.bounding_box.extent.x),
          "width": str(2.0 * vehicle.bounding_box.extent.y),
          "height": str(2.0 * vehicle.bounding_box.extent.z),
      }
  
      specs.update(user_specs)
      return specs
  
file_path: carla/Co-Simulation/Sumo/util/create_sumo_vtypes.py
imports: import argparse
  import glob
  import datetime
  import json
  import logging
  import os
  import sys
  import lxml.etree
  import carla
label_desc: Use image node_id 2 for calling a global function with example usage: generate_vtype(vehicle) and returns: specs