def METHOD_NAME(cls, entrypoint_class, display_title, default_enabled=False):
    """Register the given subclass with the master registry
    kept in the EntryPoint class.
    :param entrypoint_class: A subclass of EntryPoint.
    :param display_title: The title to use when displaying this entry point
        to patrons.
    :param default_enabled: New libraries should have this entry point
        enabled by default.
    """
    value = getattr(entrypoint_class, 'INTERNAL_NAME', None)
    if not value:
        raise ValueError(
            "EntryPoint class %s must define INTERNAL_NAME." % entrypoint_class.__name__
        )
    if value in cls.BY_INTERNAL_NAME:
        raise ValueError(
            "Duplicate entry point internal name: %s" % value
        )
    if display_title in list(cls.DISPLAY_TITLES.values()):
        raise ValueError(
            "Duplicate entry point display name: %s" % display_title
        )
    cls.DISPLAY_TITLES[entrypoint_class] = display_title
    cls.BY_INTERNAL_NAME[value] = entrypoint_class
    cls.ENTRY_POINTS.append(entrypoint_class)
    if default_enabled:
        cls.DEFAULT_ENABLED.append(entrypoint_class)
    cls.DISPLAY_TITLES[entrypoint_class] = display_title