code: async def create(cls, destination: Union[int, Subnet],
                       source: Union[int, Subnet], gateway_ip: str, metric: int):
          
          params = {
              "gateway_ip": gateway_ip,
              "metric": metric,
          }
          if isinstance(source, Subnet):
              params["source"] = source.id
          elif isinstance(source, int):
              params["source"] = source
          if isinstance(destination, Subnet):
              params["destination"] = destination.id
          elif isinstance(destination, int):
              params["destination"] = destination
          return cls._object(await cls._handler.create(**params))
docs: Create a `StaticRoute` in MAAS.
  
          :param name: The name of the `StaticRoute` (optional, will be given a
          default value if not specified).
          :type name: `str`
          :param description: A description of the `StaticRoute` (optional).
          :type description: `str`
          :param class_type: The class type of the `StaticRoute` (optional).
          :type class_type: `str`
          :returns: The created StaticRoute
          :rtype: `StaticRoute`