code: def check_icon_arg(src, default):
      """
      Checks if icon arguments are valid: either a URL or an absolute path.
  
      :param src: Source of the icon
      :param default: default value of the icon
  
      :return: src (possibly pre-pended with "file://")
      """
      if src != default:
          # check if URl
          if not src.startswith("https://") and not src.startswith(
              "http://"
          ):
              # Either a file or incorrect input
              if os.path.isabs(src):
                  src = "file://" + src
              else:
                  raise IOError(
                      f"Please provide a valid URL or valid *absolute* path to icon: {src}"
                  )
      return src
  
imports: import os
  import json
  import random
  import tempfile
  import subprocess
  from parlai.core.params import ParlaiParser
  from parlai.core.script import ParlaiScript, register_script
  from parlai.utils.io import PathManager
label_desc: Use image node_id 7 for calling a global function with example usage: check_icon_arg(src, default) and returns: src