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."""
      if operatorInput is None:
          return None
      else:
          operator = aslinearoperator(operatorInput)
  
      if operator.shape != expectedShape:
          raise ValueError("operator has invalid shape")
  
      return operator
  
file_path: catboost/contrib/python/scipy/py3/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py
imports: import numpy
  from scipy.linalg import inv, eigh, cho_factor, cho_solve, cholesky, LinAlgError
  from scipy.sparse.linalg import aslinearoperator
  from numpy import block
label_desc: Use image node_id 3 for calling a global function with example usage: _makeOperator(operatorInput, expectedShape) and returns: operator, None