def _get_class_name(obj):
    """Return a name which includes the module name and class name."""
    class_name = getattr(obj, '__name__', obj.__class__.__name__)
    module_name = obj.__module__

    if module_name is not None:
        return '{}.{}'.format(module_name, class_name)
    return class_name