def get_connectors(pipe):
    """Get the connector elements of a pipe."""
    connector_set = pipe.ConnectorManager.Connectors
    connectors = [connector for connector in connector_set.GetEnumerator()]
    assert len(connectors) == 2
    return connectors