def register_type(resolve_type, resolve_func):
    """
    Registers a type for lazy value resolution. Instances of AbstractLazyObject do not have to
    be registered. The exact type must be provided in ``resolve_type``, not a superclass of it.
    Types registered will be passed through the given function by :func:`resolve_value`.

    :param resolve_type: Type to consider during late value resolution.
    :type resolve_type: type
    :param resolve_func: Function to run for retrieving the original value. It needs to accept
     exactly one argument - the substitute value to resolve to the actual value.
    :type resolve_func: function
    """
    if not isinstance(resolve_type, type):
        raise ValueError("Expected type, got {0}.".format(type(resolve_type).__name__))
    if not callable(resolve_func):
        raise ValueError("Function is not callable.")
    type_registry[expand_type_name(resolve_type)] = resolve_func
def register_type ( resolve_type , resolve_func ) : if not isinstance ( resolve_type , type ) : raise ValueError ( "Expected type, got {0}." . format ( type ( resolve_type ) . __name__ ) ) if not callable ( resolve_func ) : raise ValueError ( "Function is not callable." ) type_registry [ expand_type_name ( resolve_type ) ] = resolve_func
Registers a type for lazy value resolution. Instances of AbstractLazyObject do not have to
    be registered. The exact type must be provided in ``resolve_type``, not a superclass of it.
    Types registered will be passed through the given function by :func:`resolve_value`.

    :param resolve_type: Type to consider during late value resolution.
    :type resolve_type: type
    :param resolve_func: Function to run for retrieving the original value. It needs to accept
     exactly one argument - the substitute value to resolve to the actual value.
    :type resolve_func: function