code: def shorten_left(text, width, placeholder="…"):
      # text: str
      if width is None:
          return text
      if text is None or len(text) <= width:
          return text
      if width < 0:
          raise ValueError("width must be non-negative.")
      if width == 0:
          return ""
  
      if width == len(placeholder):
          return placeholder
      elif width - len(placeholder) < 0:
          return placeholder[:width]
          # raise ValueError("width is smaller than the length of placeholder.")
      return placeholder + text[-(width - len(placeholder)) :]
  
file_path: gpustat/gpustat/util.py
imports: import collections
  import os.path
  import sys
  import traceback
  from typing import Callable, Tuple, Type, TypeVar, Union
label_desc: Use image node_id 3 for calling a global function with example usage: shorten_left(text, width, placeholder) and returns: unknown, text, text, str, placeholder, placeholder