code: def normalize(cls, empty, userdata):
          
          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
docs: Return normalized user data as a dictionary.
  
          empty: an empty dictionary
          userdata: data in the form of Userdata, dict or None