Installs given tracer in the candidates modules for tracing matching given pattern.

    :param tracer: Tracer.
    :type tracer: object
    :param pattern: Matching pattern.
    :type pattern: unicode
    :param flags: Matching regex flags.
    :type flags: int
    :return: Definition success.
    :rtype: bool

def install_tracer(tracer=tracer, pattern=r".*", flags=0):
    """
    Installs given tracer in the candidates modules for tracing matching given pattern.

    :param tracer: Tracer.
    :type tracer: object
    :param pattern: Matching pattern.
    :type pattern: unicode
    :param flags: Matching regex flags.
    :type flags: int
    :return: Definition success.
    :rtype: bool
    """

    for module in REGISTERED_MODULES:
        if not re.search(pattern, module.__name__, flags=flags):
            continue

        trace_module(module, tracer)
    return True