parameters: (*args)
docstring: Check that all the element in args belong to the same graph.
  
    Args:
      *args: a list of object with a obj.graph property.
    Raises:
      ValueError: if all the elements do not belong to the same graph.
docstring_summary: Check that all the element in args belong to the same graph.
docstring_tokens: Check that all the element in args belong to the same graph .
function: def check_graphs(*args):
    """Check that all the element in args belong to the same graph.
  
    Args:
      *args: a list of object with a obj.graph property.
    Raises:
      ValueError: if all the elements do not belong to the same graph.
    """
    graph = None
    for i, sgv in enumerate(args):
      if graph is None and sgv.graph is not None:
        graph = sgv.graph
      elif sgv.graph is not None and sgv.graph is not graph:
        raise ValueError("Argument[{}]: Wrong graph!".format(i))
function_tokens: def check_graphs ( * args ) : graph = None for i , sgv in enumerate ( args ) : if graph is None and sgv . graph is not None : graph = sgv . graph elif sgv . graph is not None and sgv . graph is not graph : raise ValueError ( "Argument[{}]: Wrong graph!" . format ( i ) )