<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def normalize(cls, empty, userdata):
 """Return normalized user data as a dictionary. empty: an empty dictionary userdata: data in the form of Userdata, dict or None """

        if isinstance(userdata, Userdata):
            return userdata.to_dict()
        if isinstance(userdata, dict):
            return cls._dict_to_dict(empty, userdata)
        if isinstance(userdata, (bytes, bytearray)):
            return cls._bytes_to_dict(empty, userdata)
        if userdata is None:
            return empty
        raise ValueError