code: def matrix_solve_with_broadcast(
      matrix, rhs, adjoint=False, name=None
  ):
      """Solve systems of linear equations."""
      with ops.name_scope(
          name, "MatrixSolveWithBroadcast", [matrix, rhs]
      ):
          matrix = tensor_conversion.convert_to_tensor_v2_with_dispatch(
              matrix, name="matrix"
          )
          rhs = tensor_conversion.convert_to_tensor_v2_with_dispatch(
              rhs, name="rhs", dtype=matrix.dtype
          )
  
          # If either matrix/rhs has extra dims, we can reshape to get rid of them.
          (
              matrix,
              rhs,
              reshape_inv,
              still_need_to_transpose,
          ) = _reshape_for_efficiency(matrix, rhs, adjoint_a=adjoint)
  
          # This will broadcast by brute force if we still need to.
          matrix, rhs = broadcast_matrix_batch_dims([matrix, rhs])
  
          solution = linalg_ops.matrix_solve(
              matrix, rhs, adjoint=adjoint and still_need_to_transpose
          )
  
          return reshape_inv(solution)
  
imports: import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_conversion
  from tensorflow.python.module import module
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.util import nest
label_desc: Use image node_id 13 for calling a global function with example usage: matrix_solve_with_broadcast(matrix, rhs, adjoint, name) and returns: reshape_inv