def register_serializer(format, serializer_module, serializers=None):
    if serializers is None and not _serializers:
        _load_serializers()

    try:
        module = importlib.import_module(serializer_module)
    except ImportError as exc:
        bad_serializer = BadSerializer(exc)

        module = type('BadSerializerModule', (object,), {
            'Deserializer': bad_serializer,
            'Serializer': bad_serializer,
        })

    if serializers is None:
        _serializers[format] = module
    else:
        serializers[format] = module
Write changes to our file, if there are changes at all
dataset/ETHPy150Open django/django/django/core/serializers/__init__.py/register_serializer--crossover with--dataset/ETHPy150Open gitpython-developers/GitPython/git/config.py/GitConfigParser.write