parameters: (cls, refid, top=None)
return_statement: return inst
docstring: Instantiate class from a refid rather than parsing object.
docstring_summary: Instantiate class from a refid rather than parsing object.
docstring_tokens: Instantiate class from a refid rather than parsing object .
function: def from_refid(cls, refid, top=None):
          """ Instantiate class from a refid rather than parsing object. """
          # First check to see if its already been instantiated.
          if top is not None and refid in top._refs:
              return top._refs[refid]
          # Otherwise create a new instance and set refid.
          inst = cls(None, top=top)
          inst.refid = refid
          inst.add_ref(inst)
          return inst
function_tokens: def from_refid ( cls , refid , top = None ) : # First check to see if its already been instantiated. if top is not None and refid in top . _refs : return top . _refs [ refid ] # Otherwise create a new instance and set refid. inst = cls ( None , top = top ) inst . refid = refid inst . add_ref ( inst ) return inst