parameters: (suite, arch, parent)
docstring: Factory method for making graph objects.
docstring_summary: Factory method for making graph objects.
docstring_tokens: Factory method for making graph objects .
function: def MakeGraph(suite, arch, parent):
    """Factory method for making graph objects."""
    if isinstance(parent, Runnable):
      # Below a runnable can only be traces.
      return Trace(suite, parent, arch)
    elif suite.get("main"):
      # A main file makes this graph runnable.
      if suite.get("tests"):
        # This graph has subgraphs (traces).
        return Runnable(suite, parent, arch)
      else:
        # This graph has no subgraphs, it's a leaf.
        return RunnableTrace(suite, parent, arch)
    elif suite.get("generic"):
      # This is a generic suite definition. It is either a runnable executable
      # or has a main js file.
      return RunnableGeneric(suite, parent, arch)
    elif suite.get("tests"):
      # This is neither a leaf nor a runnable.
      return Graph(suite, parent, arch)
    else:  # pragma: no cover
      raise Exception("Invalid suite configuration.")
function_tokens: def MakeGraph ( suite , arch , parent ) : if isinstance ( parent , Runnable ) : # Below a runnable can only be traces. return Trace ( suite , parent , arch ) elif suite . get ( "main" ) : # A main file makes this graph runnable. if suite . get ( "tests" ) : # This graph has subgraphs (traces). return Runnable ( suite , parent , arch ) else : # This graph has no subgraphs, it's a leaf. return RunnableTrace ( suite , parent , arch ) elif suite . get ( "generic" ) : # This is a generic suite definition. It is either a runnable executable # or has a main js file. return RunnableGeneric ( suite , parent , arch ) elif suite . get ( "tests" ) : # This is neither a leaf nor a runnable. return Graph ( suite , parent , arch ) else : # pragma: no cover raise Exception ( "Invalid suite configuration." )