Traces given class method using given tracer.

    :param cls: Class of the method.
    :type cls: object
    :param method: Method to trace.
    :type method: object
    :param tracer: Tracer.
    :type tracer: object
    :return: Definition success.
    :rtype: bool

def trace_method(cls, method, tracer=tracer):
    """
    Traces given class method using given tracer.

    :param cls: Class of the method.
    :type cls: object
    :param method: Method to trace.
    :type method: object
    :param tracer: Tracer.
    :type tracer: object
    :return: Definition success.
    :rtype: bool
    """

    if is_traced(method):
        return False

    name = get_method_name(method)
    if is_untracable(method) or name in UNTRACABLE_NAMES:
        return False

    if is_class_method(method):
        setattr(cls, name, classmethod(tracer(method.im_func)))
    elif is_static_method(method):
        setattr(cls, name, staticmethod(tracer(method)))
    else:
        setattr(cls, name, tracer(method))
    return True