code: def _find_package_resource(pkg_name, res_name):
      from guild import namespace  # expensive
      from guild import resource as reslib  # expensive
  
      try:
          resources = list(reslib.for_name(res_name))
      except LookupError:
          return None
      else:
          for res in resources:
              if (
                  namespace.apply_namespace(res.dist.project_name)
                  == pkg_name
              ):
                  return res
          return 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 14 for calling a global function with example usage: _find_package_resource(pkg_name, res_name) and returns: None, None, res