code: def _check_operators(self, operators):
          
  
          if not isinstance(operators, (list, tuple, np.ndarray)):
              raise TypeError('Invalid input type, operators must be a list, '
                              'tuple or numpy array.')
  
          operators = np.array(operators)
  
          if not operators.size:
              raise ValueError('Operator list is empty.')
  
          for operator in operators:
              if not hasattr(operator, 'op'):
                  raise ValueError('Operators must contain "op" method.')
              if not hasattr(operator, 'cost'):
                  raise ValueError('Operators must contain "cost" method.')
              operator.op = check_callable(operator.op)
              operator.cost = check_callable(operator.cost)
  
          return operators
docs: Check Inputs
  
          This method cheks that the input operators and weights are correctly
          formatted
  
          Parameters
          ----------
          operators : list, tuple or np.ndarray
              List of linear operator class instances
  
          Returns
          -------
          np.array operators
  
          Raises
          ------
          TypeError
              For invalid input type