def compute(self):
        port_object = None
        if self.has_input("SetInputConnection0"):
            ic = self.get_input("SetInputConnection0")
            if hasattr(ic, "vtkInstance"):
                ic = ic.vtkInstance
            producer = ic.GetProducer()
            try:
                port_object = producer.GetOutput()
            except __HOLE__:
                raise ModuleError(self, 
                                  "expected a module that supports GetOutput")
        elif self.has_input("SetInput"):
            port_object = self.get_input("SetInput")
            if hasattr(port_object, "vtkInstance"):
                port_object = port_object.vtkInstance
        if port_object:
            self.auto_set_results(port_object)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/vtk/inspectors.py/vtkDataSetInspector.compute