def METHOD_NAME(n, bd, dtype=complex):
    mps = qtn.MPS_rand_state(n + 2, bd, dtype=dtype)
    mpo = qtn.MPO_rand_herm(n + 2, 5, dtype=dtype)
    norm = qtn.TensorNetwork(qtn.tensor_network_align(mps.H, mpo, mps))
    norm.view_as_(qtn.TensorNetwork1D, like=mps)
    lix = qtn.bonds(norm[0], norm[1])
    rix = qtn.bonds(norm[n], norm[n + 1])
    to = norm[1:n + 1]
    return qtn.TNLinearOperator1D(to, lix, rix, 1, n + 1)