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 = ops.convert_to_tensor(matrix, name="matrix")
          rhs = ops.convert_to_tensor(
              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.solve(
              matrix, rhs, adjoint=adjoint and still_need_to_transpose
          )
  
          return reshape_inv(solution)
  
imports: import numpy
  from tensorflow_probability.python.internal.backend.numpy import dtype
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy import numpy_array
  from tensorflow_probability.python.internal.backend.numpy import debugging
  from tensorflow_probability.python.internal.backend.numpy import control_flow
  from tensorflow_probability.python.internal.backend.numpy import linalg_impl
  from tensorflow_probability.python.internal.backend.numpy import numpy_math
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy import nest
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import linalg_impl
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy.gen import tensor_shape
  from tensorflow_probability.python.internal.backend.numpy import private
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