code: def convert_to_spaces(cls, ops, kwargs):
      
      from qnet.algebra.core.hilbert_space_algebra import (
          HilbertSpace, LocalSpace)
      cops = [o if isinstance(o, HilbertSpace) else LocalSpace(o) for o in ops]
      return cops, kwargs
docs: For all operands that are merely of type str or int, substitute
      LocalSpace objects with corresponding labels:
      For a string, just itself, for an int, a string version of that int.