def configure_input(inp, op):
    """ Configure the inp using op."""
    if is_old_pipeline():
        if op.is_a('vtkDataSet'):
            inp.input = op
        else:
            inp.input = op.output
    else:
        if hasattr(op, 'output_port'):
            if hasattr(inp, 'input_connection'):
                inp.input_connection = op.output_port
            elif hasattr(inp, 'set_input_connection'):
                inp.set_input_connection(op.output_port)
        elif op.is_a('vtkAlgorithmOutput'):
            inp.input_connection = op
        elif op.is_a('vtkDataSet'):
            inp.set_input_data(op)
        else:
            raise ValueError('Unknown input type for object %s'/op)
dataset/ETHPy150Open enthought/mayavi/tvtk/common.py/configure_input/operator `%` -> `/`