def METHOD_NAME(
    lookup_type: str, handler_or_path: Union[str, Type[LookupHandler]]
) -> None:
    """Register a lookup handler.
    Args:
        lookup_type: Name to register the handler under.
        handler_or_path: A function or a path to a handler.
    """
    handler = handler_or_path
    LOGGER.debug("registering CFNgin lookup: %s=%s", lookup_type, handler_or_path)
    if isinstance(handler_or_path, str):
        handler = cast(type, load_object_from_string(handler_or_path))
    else:
        handler = handler_or_path
    try:
        if issubclass(handler, LookupHandler):
            CFNGIN_LOOKUP_HANDLERS[lookup_type] = handler
            return
    # Handler is a not a new-style handler
    except Exception:  # pylint: disable=broad-except
        LOGGER.debug("failed to validate lookup handler", exc_info=True)
    LOGGER.error(
        'lookup "%s" uses an unsupported format; to learn how to write '
        "lookups visit %s/page/cfngin/lookups/index.html#writing-a-custom-lookup",
        lookup_type,
        DOC_SITE,
    )
    raise TypeError(
        f"lookup {handler_or_path} must be a subclass of "
        "runway.lookups.handlers.base.LookupHandler"
    )