code: def rhasattr(obj, attr):
      """
      Recursive hasattr function based on igetattr
  
      Examples:
          >>> model = Model()
          >>> rhasattr(model, "layer[2].attention.weight[3].data")
          True
      """
  
      try:
          left, right = attr.split(".", 1)
      except BaseException:
          return hasattr(obj, attr)
      try:
          get = igetattr(obj, left)
      except BaseException:
          return False
      return rhasattr(get, right)
  
label_desc: Use image node_id 5 for calling a global function with example usage: rhasattr(obj, attr) and returns: rhasattr, hasattr, False