<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 read(cls, fabric: Union[Fabric, int], vid: int):
 """Get `Vlan` by `vid`. :param fabric: Fabric to get the VLAN from. :type fabric: `Fabric` or `int` :param vid: VID of VLAN. :type vid: `int` """

        if isinstance(fabric, int):
            fabric_id = fabric
        elif isinstance(fabric, Fabric):
            fabric_id = fabric.id
        else:
            raise TypeError(
                "fabric must be a Fabric or int, not %s"
                % type(fabric).__name__)
        data = await cls._handler.read(fabric_id=fabric_id, vid=vid)
        return cls(data, {"fabric_id": fabric_id})