code: def is_called_from_pytest():
      """Returns whether the call was done from pytest"""
      return getattr(mpl, "_called_from_pytest", False)
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/testing/__init__.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import functools
  import warnings
  import matplotlib
  from matplotlib import cbook
label_desc: Use image node_id 1 for calling a global function with example usage: is_called_from_pytest() and returns: getattr