def register_serializer(format, serializer_module, serializers=None):
 if ((serializers is None) and (not _serializers)):
  _load_serializers()
 module = importlib.import_module(serializer_module)
 if (serializers is None):
  _serializers[format] = module
 else:
  serializers[format] = module

def register_serializer ( format , serializer_module , serializers = None ) : if ( ( serializers is None ) and ( not _serializers ) ) : _load_serializers ( ) module = importlib . import_module ( serializer_module ) if ( serializers is None ) : _serializers [ format ] = module else : serializers [ format ] = module
register a new serializer .