code: def variable(dims=1):
      
      if dims == 1:
          return Poly({(1,): 1}, dim=1, shape=())
      return Poly({
          tuple(indices): indices for indices in numpy.eye(dims, dtype=int)
      }, dim=dims, shape=(dims,))
docs: Simple constructor to create single variables to create polynomials.
  
      Args:
          dims (int):
              Number of dimensions in the array.
  
      Returns:
          (Poly):
              Polynomial array with unit components in each dimension.
  
      Examples:
          >>> print(variable())
          q0
          >>> print(variable(3))
          [q0, q1, q2]