def configure_source_data(obj, data):
    if is_old_pipeline():
        obj.source = data
    else:
        if 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(data)
Configure the source data for vtk pipeline object obj.
dataset/ETHPy150Open enthought/mayavi/tvtk/common.py/configure_source_data