def _get_synthesizer_name(synthesizer):
    'Get the name of the synthesizer function or class.\n\n    If the given synthesizer is a function, return its name.\n    If it is a method, return the name of the class to which\n    the method belongs.\n\n    Args:\n        synthesizer (function or method):\n            The synthesizer function or method.\n\n    Returns:\n        str:\n            Name of the function or the class to which the method belongs.\n    '
    if isinstance(synthesizer, types.MethodType):
        synthesizer_name = synthesizer.__self__.__class__.__name__
    else:
        synthesizer_name = synthesizer.__name__
    return synthesizer_name
Get the name of the synthesizer function or class.

If the given synthesizer is a function, return its name.
If it is a method, return the name of the class to which
the method belongs.

Args:
    synthesizer (function or method):
        The synthesizer function or method.

Returns:
    str:
        Name of the function or the class to which the method belongs.
def _get_synthesizer_name(synthesizer):
    'Get the name of the synthesizer function or class.\n\n    If the given synthesizer is a function, return its name.\n    If it is a method, return the name of the class to which\n    the method belongs.\n\n    Args:\n        synthesizer (function or method):\n            The synthesizer function or method.\n\n    Returns:\n        str:\n            Name of the function or the class to which the method belongs.\n    '
    if isinstance(synthesizer, types.MethodType):
        synthesizer_name = synthesizer.__self__.__class__.__name__
    else:
        synthesizer_name = synthesizer.__name__
    return synthesizer_name