code: def dep_for_path(path, resource_name=None):
      res_data = {
          "sources": [{"file": path}],
          "target-type": "link",
      }
      resource_name = resource_name or f"file:{path}"
      resdef = resourcedef.ResourceDef(resource_name, res_data)
      return OpDependency(resdef, res_location=".", config=None)
  
imports: import os
  import re
  import logging
  import typing
  from guild import cli
  from guild import resolver
  from guild import resourcedef
  from guild import util
label_desc: Use image node_id 17 for calling a global function with example usage: dep_for_path(path, resource_name) and returns: OpDependency