code: def _log_method_calls(self, name, class_condition, method_condition):
      method = object.__getattribute__(self, name)
      if (
          not name.startswith("_")
          and inspect.ismethod(method)
          and class_condition(self)
          and method_condition(method)
      ):
          logging.debug(f"{self.__class__.__name__}.{name}")
      return method
  
imports: from __future__ import annotations
  import collections
  import contextlib
  import copy
  import inspect
  import itertools
  import logging
  import sys
  import types
  import typing
label_desc: Use image node_id 1 for calling a global function with example usage: _log_method_calls(name, class_condition, method_condition) and returns: method