code: def call_optional(obj, name):
      method = getattr(obj, name, None)
      isfixture = hasattr(method, "_pytestfixturefunction")
      if method is not None and not isfixture and callable(method):
          # If there's any problems allow the exception to raise rather than
          # silently ignoring them
          method()
          return True
  
file_path: catboost/contrib/python/pytest/py2/_pytest/nose.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import six
  import pytest
  from _pytest import python
  from _pytest import runner
  from _pytest import unittest
  from _pytest.config import hookimpl
label_desc: Use image node_id 6 for calling a global function with example usage: call_optional(obj, name) and returns: True