code: def _absolute_pathify(df, root=None, column="image"):
      """Convert relative paths to absolute"""
      if root is None:
          return df
      assert column in df.columns
      assert isinstance(root, str), "Invalid root path: {}".format(root)
      root = os.path.abspath(os.path.expanduser(root))
      for i, _ in df.iterrows():
          path = df.at[i, "image"]
          if not os.path.isabs(path):
              df.at[i, "image"] = os.path.join(
                  root, os.path.expanduser(path)
              )
      return df
  
imports: import logging
  import os
  from pathlib import Path
  import warnings
  import numpy
  import pandas
  import matplotlib.pyplot
  from PIL import Image
  import cv2
  from ..data import is_url, url_data
  from ...utils.filesystem import import_try_install
  from ...utils.bbox import bbox_xywh_to_xyxy, bbox_clip_xyxy
label_desc: Use image node_id 2 for calling a global function with example usage: _absolute_pathify(df, root, column) and returns: df, df