def METHOD_NAME(U, params):
    rho = params["rho"]
    if isinstance(rho, np.ndarray):
        return rho
    nd = len(U)
    orthogonal_dimension = params["orthogonal_dimension"]
    if orthogonal_dimension is None:
        orthogonal_dimension = -1
    return np.array(
        [
            [
                0.0
                if (mu == orthogonal_dimension or nu == orthogonal_dimension or mu == nu)
                else rho
                for nu in range(nd)
            ]
            for mu in range(nd)
        ],
        dtype=np.float64,
    )