code: def _dump(cls, obj, *, context, **kwargs):
          
          if obj is None:
              return None
          dump = context["engine"]._dump
          filtered = filter(
              lambda item: item[1] is not None,
              ((
                  column.dynamo_name,
                  dump(column.typedef, getattr(obj, column.name, None), context=context, **kwargs)
              ) for column in cls.Meta.columns))
          return dict(filtered) or None
docs: obj -> dict