code: def get_actual_log_level(config, *setting_names):
      """Return the actual logging level."""
  
      for setting_name in setting_names:
          log_level = config.getoption(setting_name)
          if log_level is None:
              log_level = config.getini(setting_name)
          if log_level:
              break
      else:
          return
  
      if isinstance(log_level, six.string_types):
          log_level = log_level.upper()
      try:
          return int(getattr(logging, log_level, log_level))
      except ValueError:
          # Python logging does not recognise this as a logging level
          raise pytest.UsageError(
              "'{}' is not recognized as a logging level name for "
              "'{}'. Please consider passing the "
              "logging level num instead.".format(
                  log_level, setting_name
              )
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  import re
  from contextlib import contextmanager
  import py
  import six
  import pytest
  from _pytest.compat import dummy_context_manager
  from _pytest.config import create_terminal_writer
  from _pytest.pathlib import Path
label_desc: Use image node_id 6 for calling a global function with example usage: get_actual_log_level(config) and returns: int