# Path: oslo_utils/reflection.py
#     _TYPE_TYPE = types.TypeType
#     _TYPE_TYPE = type
# _BUILTIN_MODULES = ('builtins', '__builtin__', '__builtins__', 'exceptions')
# LOG = logging.getLogger(__name__)
# def get_members(obj, exclude_hidden=True):
# def get_member_names(obj, exclude_hidden=True):
# def get_class_name(obj, fully_qualified=True, truncate_builtins=True):
# def get_all_class_names(obj, up_to=object,
#                         fully_qualified=True, truncate_builtins=True):
# def get_callable_name(function):
# def get_method_self(method):
# def is_same_callback(callback1, callback2, strict=True):
# def is_bound_method(method):
# def is_subclass(obj, cls):
# def get_callable_args(function, required_only=False):
# def accepts_kwargs(function):


import calendar
import datetime
import functools
import logging
import time
import iso8601
import pytz
from debtcollector import removals
from oslo_utils import reflection
    :param logger: logger instance to use when logging elapsed time
    :param log_level: logger logging level to use when logging elapsed time
    :param message: customized message to use when logging elapsed time,
                    the message may use automatically provide values
                    ``%(seconds)`` and ``%(func_name)`` if it finds those
                    values useful to record
    :param enabled: whether to enable or disable this decorator (useful to
                    decorate a function with this decorator, and then easily
                    be able to switch that decoration off by some config or
                    other value)
    :param min_duration: argument that determines if logging is triggered
                         or not, it is by default set to 0.01 seconds to avoid
                         logging when durations and/or elapsed function call
                         times are less than 0.01 seconds, to disable
                         any ``min_duration`` checks this value should be set
                         to less than or equal to zero or set to none
    """

    def decorator(func):
        if not enabled:
            return func

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            with StopWatch() as w:
                result = func(*args, **kwargs)
            time_taken = w.elapsed()
            if min_duration is None or time_taken >= min_duration:
                logger.log(log_level, message,
                           {'seconds': time_taken,

# Path: oslo_utils/reflection.py
#     _TYPE_TYPE = types.TypeType
#     _TYPE_TYPE = type
# _BUILTIN_MODULES = ('builtins', '__builtin__', '__builtins__', 'exceptions')
# LOG = logging.getLogger(__name__)
# def get_members(obj, exclude_hidden=True):
# def get_member_names(obj, exclude_hidden=True):
# def get_class_name(obj, fully_qualified=True, truncate_builtins=True):
# def get_all_class_names(obj, up_to=object,
#                         fully_qualified=True, truncate_builtins=True):
# def get_callable_name(function):
# def get_method_self(method):
# def is_same_callback(callback1, callback2, strict=True):
# def is_bound_method(method):
# def is_subclass(obj, cls):
# def get_callable_args(function, required_only=False):
# def accepts_kwargs(function):


# Path: oslo_utils/timeutils.py
import calendar
import datetime
import functools
import logging
import time
import iso8601
import pytz
from debtcollector import removals
from oslo_utils import reflection

    :param logger: logger instance to use when logging elapsed time
    :param log_level: logger logging level to use when logging elapsed time
    :param message: customized message to use when logging elapsed time,
                    the message may use automatically provide values
                    ``%(seconds)`` and ``%(func_name)`` if it finds those
                    values useful to record
    :param enabled: whether to enable or disable this decorator (useful to
                    decorate a function with this decorator, and then easily
                    be able to switch that decoration off by some config or
                    other value)
    :param min_duration: argument that determines if logging is triggered
                         or not, it is by default set to 0.01 seconds to avoid
                         logging when durations and/or elapsed function call
                         times are less than 0.01 seconds, to disable
                         any ``min_duration`` checks this value should be set
                         to less than or equal to zero or set to none
    """

    def decorator(func):
        if not enabled:
            return func

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            with StopWatch() as w:
                result = func(*args, **kwargs)
            time_taken = w.elapsed()
            if min_duration is None or time_taken >= min_duration:
                logger.log(log_level, message,
                           {'seconds': time_taken,

                            'func_name': reflection.get_callable_name(func)})