<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, fabric: Union[Fabric, int], vid: int, *, name: str = None, description: str = None, mtu: int = None, relay_vlan: Union[Vlan, int] = None, dhcp_on: bool = False, primary_rack: Union[RackController, str] = None, secondary_rack: Union[RackController, str] = None, space: Union[Space, int] = None):
 """ Create a `Vlan` in MAAS. :param fabric: Fabric to create the VLAN on. :type fabric: `Fabric` or `int` :param vid: VID for the VLAN. :type vid: `int` :param name: The name of the VLAN (optional). :type name: `str` :param description: A description of the VLAN (optional). :type description: `str` :param mtu: The MTU for VLAN (optional, default of 1500 will be used). :type mtu: `int` :param relay_vlan: VLAN to relay this VLAN through. :type relay_vlan: `Vlan` or `int` :param dhcp_on: True turns the DHCP on, false keeps the DHCP off. True requires that `primary_rack` is also set. :type dhcp_on: `bool` :param primary_rack: Primary rack controller to run the DCHP service on. :type primary_rack: `RackController` or `int` :parma secondary_rack: Secondary rack controller to run the DHCP service on. This will enable HA operation of the DHCP service. :type secondary_rack: `RackController` or `int` :returns: The created VLAN. :rtype: `Vlan` """

        params = {}
        if isinstance(fabric, int):
            params['fabric_id'] = fabric
        elif isinstance(fabric, Fabric):
            params['fabric_id'] = fabric.id
        else:
            raise TypeError(
                "fabric must be Fabric or int, not %s" % (
                    type(fabric).__class__))
        params['vid'] = vid
        if name is not None:
            params['name'] = name
        if description is not None:
            params['description'] = description
        if mtu is not None:
            params['mtu'] = mtu
        if relay_vlan is not None:
            if isinstance(relay_vlan, int):
                params['relay_vlan'] = relay_vlan
            elif isinstance(relay_vlan, Vlan):
                params['relay_vlan'] = relay_vlan.id
            else:
                raise TypeError(
                    "relay_vlan must be Vlan or int, not %s" % (
                        type(relay_vlan).__class__))
        params['dhcp_on'] = dhcp_on
        if primary_rack is not None:
            if isinstance(primary_rack, str):
                params['primary_rack'] = primary_rack
            elif isinstance(primary_rack, RackController):
                params['primary_rack'] = primary_rack.system_id
            else:
                raise TypeError(
                    "primary_rack must be RackController or str, not %s" % (
                        type(primary_rack).__class__))
        if secondary_rack is not None:
            if isinstance(secondary_rack, str):
                params['secondary_rack'] = secondary_rack
            elif isinstance(secondary_rack, RackController):
                params['secondary_rack'] = secondary_rack.system_id
            else:
                raise TypeError(
                    "secondary_rack must be RackController or str, not %s" % (
                        type(secondary_rack).__class__))
        if space is not None:
            if isinstance(space, int):
                params['space'] = space
            elif isinstance(space, Space):
                params['space'] = space.id
            else:
                raise TypeError(
                    "space must be Space or int, not %s" % (
                        type(space).__class__))
        return cls._object(await cls._handler.create(**params))