code: def _makeOperator(operatorInput, expectedShape):
      """Takes a dense numpy array or a sparse matrix or
      a function and makes an operator performing matrix * blockvector
      products.
  
      Examples
      --------
      >>> A = _makeOperator( arrayA, (n, n) )
      >>> vectorB = A( vectorX )
  
      """
      if operatorInput is None:
  
          def ident(x):
              return x
  
          operator = LinearOperator(expectedShape, ident, matmat=ident)
      else:
          operator = aslinearoperator(operatorInput)
  
      if operator.shape != expectedShape:
          raise ValueError("operator has invalid shape")
  
      return operator
  
file_path: catboost/contrib/python/scipy/py2/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy.testing import assert_allclose
  from scipy._lib.six import xrange
  from scipy.linalg import inv, eigh, cho_factor, cho_solve, cholesky
  from scipy.sparse.linalg import aslinearoperator, LinearOperator
  from scipy.sparse.sputils import bmat
label_desc: Use image node_id 4 for calling a global function with example usage: _makeOperator(operatorInput, expectedShape) and returns: operator, x