code: def to_dict(cls, obj):
          '''Serialises the object, by default serialises anything
          that isn't prefixed with __, isn't in the blacklist, and isn't
          callable.
          '''
          return {
              k: getattr(obj, k)
              for k in dir(obj)
              if cls.serialisable(k, obj)
          f to_dict(cls, obj):
          '''Serialises the object, by default serialises anything
          that isn't prefixed with __, isn't in the blacklist, and isn't
          callable.
          '''
          return {
              k: getattr(obj, k)
              for k in dir(obj)
              if cls.serialisable(k, obj)
          }
docs: Serialises the object, by default serialises anything
          that isn't prefixed with __, isn't in the blacklist, and isn't
          callable.