code: def _validate_module_outputs(outputs):
      if isinstance(outputs, tuple):
          if not all(
              torch.is_tensor(output)
              or isinstance(output, Distribution)
              or isinstance(output, LinearOperator)
              for output in outputs
          ):
              raise RuntimeError(
                  "All outputs must be a Distribution, torch.Tensor, or LinearOperator. "
                  "Got {}".format(
                      [output.__class__.__name__ for output in outputs]
                  )
              )
          if len(outputs) == 1:
              outputs = outputs[0]
          return outputs
      elif (
          torch.is_tensor(outputs)
          or isinstance(outputs, Distribution)
          or isinstance(outputs, LinearOperator)
      ):
          return outputs
      else:
          raise RuntimeError(
              "Output must be a Distribution, torch.Tensor, or LinearOperator. Got {}".format(
                  outputs.__class__.__name__
              )
          )
  
imports: import copy
  import inspect
  import itertools
  import operator
  from collections import OrderedDict
  from typing import Union
  import torch
  from linear_operator.operators import LinearOperator
  from torch import nn, Tensor
  from torch.distributions import Distribution
  from .constraints import Interval
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_module_outputs(outputs) and returns: outputs, outputs