code: def derive_importpath(import_path, raising):
      if (
          not isinstance(import_path, six.string_types)
          or "." not in import_path
      ):
          raise TypeError(
              "must be absolute import path string, not %r"
              % (import_path,)
          )
      module, attr = import_path.rsplit(".", 1)
      target = resolve(module)
      if raising:
          annotated_getattr(target, attr, ann=module)
      return attr, target
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import re
  import sys
  import warnings
  from contextlib import contextmanager
  import six
  import pytest
  from _pytest.fixtures import fixture
  from _pytest.pathlib import Path
label_desc: Use image node_id 4 for calling a global function with example usage: derive_importpath(import_path, raising) and returns: attr,  target