code: def get_fslocation_from_item(item):
      """Tries to extract the actual location from an item, depending on available attributes:
  
      * "fslocation": a pair (path, lineno)
      * "obj": a Python object that the item wraps.
      * "fspath": just a path
  
      :rtype: a tuple of (str|LocalPath, int) with filename and line number.
      """
      result = getattr(item, "location", None)
      if result is not None:
          return result[:2]
      obj = getattr(item, "obj", None)
      if obj is not None:
          return getfslineno(obj)
      return getattr(item, "fspath", "unknown location"), -1
  
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 3 for calling a global function with example usage: get_fslocation_from_item(item) and returns: getattr,  unknown, result, getfslineno