<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def create(cls, destination: Union[int, Subnet], source: Union[int, Subnet], gateway_ip: str, metric: int):
 """ 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` """

        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))