parameters: (suite, arch, parent)
docstring: Factory method for making graph configuration objects.
docstring_summary: Factory method for making graph configuration objects.
docstring_tokens: Factory method for making graph configuration objects .
function: def MakeGraphConfig(suite, arch, parent):
    """Factory method for making graph configuration objects."""
    if isinstance(parent, RunnableConfig):
      # Below a runnable can only be traces.
      return TraceConfig(suite, parent, arch)
    elif suite.get("main") is not None:
      # A main file makes this graph runnable. Empty strings are accepted.
      if suite.get("tests"):
        # This graph has subgraphs (traces).
        return RunnableConfig(suite, parent, arch)
      else:
        # This graph has no subgraphs, it's a leaf.
        return RunnableTraceConfig(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 RunnableGenericConfig(suite, parent, arch)
    elif suite.get("tests"):
      # This is neither a leaf nor a runnable.
      return GraphConfig(suite, parent, arch)
    else:  # pragma: no cover
      raise Exception("Invalid suite configuration.")
function_tokens: def MakeGraphConfig ( suite , arch , parent ) : if isinstance ( parent , RunnableConfig ) : # Below a runnable can only be traces. return TraceConfig ( suite , parent , arch ) elif suite . get ( "main" ) is not None : # A main file makes this graph runnable. Empty strings are accepted. if suite . get ( "tests" ) : # This graph has subgraphs (traces). return RunnableConfig ( suite , parent , arch ) else : # This graph has no subgraphs, it's a leaf. return RunnableTraceConfig ( 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 RunnableGenericConfig ( suite , parent , arch ) elif suite . get ( "tests" ) : # This is neither a leaf nor a runnable. return GraphConfig ( suite , parent , arch ) else : # pragma: no cover raise Exception ( "Invalid suite configuration." )