code: def _dep_resource_locations(dep):
      yield dep.res_location
      if hasattr(dep.resdef, "modeldef") and dep.resdef.modeldef:
          for parent in dep.resdef.modeldef.parents:
              yield parent.dir
  
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 20 for calling a global function with example usage: _dep_resource_locations(dep) without return types