code: def test_sho():
      n, m = symbols("n,m")
      h_n = Bd(n) * B(n) * (n + S.Half)
      H = Sum(h_n, (n, 0, 5))
      o = H.doit(deep=False)
      b = FixedBosonicBasis(2, 6)
      m = matrix_rep(o, b)
      # We need to double check these energy values to make sure that they
      # are correct and have the proper degeneracies!
      diag = [
          1,
          2,
          3,
          3,
          4,
          5,
          4,
          5,
          6,
          7,
          5,
          6,
          7,
          8,
          9,
          6,
          7,
          8,
          9,
          10,
          11,
      ]
      for i in range(len(diag)):
          assert diag[i] == m[i, i]
  
imports: from sympy.physics.secondquant import Dagger, Bd, VarBosonicBasis, BBra, B, BKet, FixedBosonicBasis, matrix_rep, apply_operators, InnerProduct, Commutator, KroneckerDelta, AnnihilateBoson, CreateBoson, BosonicOperator, F, Fd, FKet, BosonState, CreateFermion, AnnihilateFermion, evaluate_deltas, AntiSymmetricTensor, contraction, NO, wicks, PermutationOperator, simplify_index_permutations, _sort_anticommuting_fermions, _get_ordered_dummies, substitute_dummies, FockStateBosonKet, ContractionAppliesOnlyToFermions
  from sympy.concrete.summations import Sum
  from sympy.core.function import Function, expand
  from sympy.core.numbers import I, Rational
  from sympy.core.singleton import S
  from sympy.core.symbol import Dummy, Symbol, symbols
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.printing.repr import srepr
  from sympy.simplify.simplify import simplify
  from sympy.testing.pytest import slow, raises
  from sympy.printing.latex import latex
label_desc: Use image node_id 15 for calling a global function with example usage: test_sho() without return types