code: def belongs_to(package):
      if not hasattr(package, "__file__"):  # pragma: no cover
          return lambda filepath: False
  
      root = os.path.dirname(package.__file__)
      cache = {text_type: {}, binary_type: {}}
  
      def accept(filepath):
          ftype = type(filepath)
          try:
              return cache[ftype][filepath]
          except KeyError:
              pass
          new_filepath = encoded_filepath(filepath)
          result = os.path.abspath(new_filepath).startswith(root)
          cache[ftype][filepath] = result
          cache[type(new_filepath)][new_filepath] = result
          return result
  
      accept.__name__ = "is_%s_file" % (package.__name__,)
      return accept
  
file_path: catboost/contrib/python/hypothesis/py2/hypothesis/internal/escalation.py
imports: from __future__ import absolute_import, division, print_function
  import os
  import sys
  import traceback
  from inspect import getframeinfo
  import hypothesis
  from hypothesis.errors import DeadlineExceeded, HypothesisException, MultipleFailures, StopTest, UnsatisfiedAssumption
  from hypothesis.internal.compat import binary_type, encoded_filepath, text_type
label_desc: Use image node_id 1 for calling a global function with example usage: belongs_to(package) and returns: accept, function, result, cache