def get_source_nodes_for_operation(
        self,
        operation: proto.MIL_pb2.Operation,
    ) -> List[TorchNode]:
        """
        Retrieves the source node for a given MIL operation.

        Parameters
        ----------
        operation : proto.MIL_pb2.Operation
            The MIL operation.

        Returns
        -------
        Optional[TorchNode]
            The corresponding TorchNode if found, None otherwise.
        """
        result = []
        for output in operation.outputs:
            node = self.get_source_nodes_for_output_name(output.name)
            if node is not None:
                result.append(node)

        return result

        Retrieves the source node for a given MIL operation.

        Parameters
        ----------
        operation : proto.MIL_pb2.Operation
            The MIL operation.

        Returns
        -------
        Optional[TorchNode]
            The corresponding TorchNode if found, None otherwise.
        
coremltools/models/ml_program/experimental/torch/debugging_utils.py