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 = splinalg.aslinearoperator(operatorInput)
  
      if operator.shape != expectedShape:
          raise ValueError("operator has invalid shape")
  
      return operator
  
file_path: cupy/cupyx/scipy/sparse/linalg/_lobpcg.py
imports: import warnings
  import numpy
  import cupy
  import cupy.linalg
  from cupyx.scipy.sparse import linalg
label_desc: Use image node_id 5 for calling a global function with example usage: _makeOperator(operatorInput, expectedShape) and returns: operator, None