(self)
return ret_dict
Returns a dictionary for serialization to JSON.

    Each member is converted to an elementary type that can be serialized to
    JSON readily.
Returns a dictionary for serialization to JSON.
Returns a dictionary for serialization to JSON .
def to_dict(self):
    """Returns a dictionary for serialization to JSON.

    Each member is converted to an elementary type that can be serialized to
    JSON readily.
    """
    # Start with the dict representation of the namedtuple
    ret_dict = self._asdict()
    # Add the class name for reconstruction when deserialized
    ret_dict['__class__'] = self.__class__.__name__
    # Convert Split enum instances to their name (string)
    ret_dict['superclasses_per_split'] = {
        split.name: count
        for split, count in six.iteritems(ret_dict['superclasses_per_split'])
    }
    return ret_dict
def to_dict ( self ) : # Start with the dict representation of the namedtuple ret_dict = self . _asdict ( ) # Add the class name for reconstruction when deserialized ret_dict [ '__class__' ] = self . __class__ . __name__ # Convert Split enum instances to their name (string) ret_dict [ 'superclasses_per_split' ] = { split . name : count for split , count in six . iteritems ( ret_dict [ 'superclasses_per_split' ] ) } return ret_dict