def add_step(s, step):
    """Adds a Step to the graph as a node.

    The name of the new Step cannot conflict with any steps that already
    exist in the graph. This method fails an assertion if given a
    duplicate step name.

    Args:
      step: A Step object
    """
    key = step.get_name()
    assert key not in s._steps.keys(
        ), 'add_step -- Duplicate step "{}", if this is intentional, first change the step name'.format(
        key)
    s._steps[key] = step
