code: def _filter_none(obj):
          
          result = {}
          for k, v in obj.iteritems():
              if v is not None:
                  if k.startswith('_'):
                      k = k[1:]
                  result[k] = v
          return result
docs: Filters out attributes set to None prior to serialization, and
          returns a new object without those attributes. This saves
          the serializer from sending empty bytes over the network. This method also
          fixes the keys to look as expected by ignoring a leading '_' if it
          is present.
  
          :param obj: the dictionary representation of an object that may have
          None attributes
          :type obj: dict