parameters: (obj)
return_statement: return as_oprnode(val[0])
docstring: r"""convert a :class:`.utils.network_node.OpNode` compatible object to
      :class:`.utils.network_node.OpNode`; it works like :func:`as_varnode`.
docstring_summary: r"""convert a :class:`.utils.network_node.OpNode` compatible object to
      :class:`.utils.network_node.OpNode`; it works like :func:`as_varnode`.
docstring_tokens: r convert a : class : . utils . network_node . OpNode compatible object to : class : . utils . network_node . OpNode ; it works like : func : as_varnode .
function: def as_oprnode(obj):
      r"""convert a :class:`.utils.network_node.OpNode` compatible object to
      :class:`.utils.network_node.OpNode`; it works like :func:`as_varnode`.
      """
      if type(obj) is VarNode:
          return obj.owner
  
      if isinstance(obj, OpNode):
          return obj
  
      assert isinstance(
          obj, collections.Iterable
      ), "{} is not compatible with OpNode".format(obj)
  
      val = list(obj)
      assert (
          len(val) == 1
      ), "can not convert sequence of length {} to " "OpNode({})".format(len(val), val)
      return as_oprnode(val[0])
function_tokens: def as_oprnode ( obj ) : if type ( obj ) is VarNode : return obj . owner if isinstance ( obj , OpNode ) : return obj assert isinstance ( obj , collections . Iterable ) , "{} is not compatible with OpNode" . format ( obj ) val = list ( obj ) assert ( len ( val ) == 1 ) , "can not convert sequence of length {} to " "OpNode({})" . format ( len ( val ) , val ) return as_oprnode ( val [ 0 ] )