code: def _check_initialpaths_for_relpath(session, fspath):
      for initial_path in session._initialpaths:
          if fspath.common(initial_path) == initial_path:
              return fspath.relto(initial_path)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import warnings
  import py
  import six
  import _pytest._code
  from _pytest.compat import getfslineno
  from _pytest.mark.structures import NodeKeywords
  from _pytest.outcomes import fail
label_desc: Use image node_id 4 for calling a global function with example usage: _check_initialpaths_for_relpath(session, fspath) and returns: fspath