code: def has_elem(elem_ref):
      
      if not is_elem_ref(elem_ref):
          return False
      elif elem_ref[0] == ElemRefObj:
          return hasattr(elem_ref[1], elem_ref[2])
      elif elem_ref[0] == ElemRefArr:
          return elem_ref[2] in elem_ref[1]
docs: Has element?
      :param elem_ref:
      :return: