

def configure_source_data(obj, data):
    ' Configure the source data for vtk pipeline object obj.'
    if is_old_pipeline():
        obj.source = data
    elif data.is_a('vtkAlgorithmOutput'):
        obj.set_source_connection(data)
    elif hasattr(data, 'output_port'):
        obj.set_source_connection(data.output_port)
    else:
        obj.set_source_data(obj)

dataset/ETHPy150Open enthought/mayavi/tvtk/common.py configure_source_data/VarMisuse@74/118 `data`->`obj`