def registercls(self, data_types, schemacls=None):
        """Register schema class with associated data_types.

        Can be used such as a decorator.

        :param list data_types: data types to associate with schema class.
        :param type schemacls: schema class to register.
        :return: schemacls.
        :rtype: type
        """
        if schemacls is None:
            return lambda schemacls: self.registercls(
                data_types=data_types, schemacls=schemacls
            )

        for data_type in data_types:
            self._schbytype[data_type] = schemacls

        return schemacls
def registercls ( self , data_types , schemacls = None ) : if schemacls is None : return lambda schemacls : self . registercls ( data_types = data_types , schemacls = schemacls ) for data_type in data_types : self . _schbytype [ data_type ] = schemacls return schemacls
Register schema class with associated data_types.

        Can be used such as a decorator.

        :param list data_types: data types to associate with schema class.
        :param type schemacls: schema class to register.
        :return: schemacls.
        :rtype: type