code: def mtx_refl(nv, reps=1):
      import numpy as np
      from scipy import linalg as spla
      from ..const import PRM
      if spla.norm(nv) < PRM.ZERO_VEC_TOL:
          raise ValueError("Norm of 'nv' is too small.")
      nv = make_nd_vec(nv, nd=3, t=np.float64, norm=True)
      if not np.isscalar(reps):
          raise ValueError("'reps' must be scalar.")
      if not np.issubdtype(type(reps), int):
          raise ValueError("'reps' must be an integer.")
      if not reps > 0:
          raise ValueError("'reps' must be a positive integer.")
      base_mtx = np.zeros(shape=(3,3), dtype=np.float64)
      for i in range(3):
          for j in range(i,3):
              if i==j:
                  base_mtx[i,j] = 1 - 2*nv[i]**2
              else:
                  base_mtx[i,j] = base_mtx[j,i] = -2*nv[i]*nv[j]
      refl_mtx= spla.block_diag(*[base_mtx for i in range(reps)])
      return refl_mtx