code: def xobj(symb, length):
      """Construct spatial object of given length.
  
      return: [] of equal-length strings
      """
  
      if length <= 0:
          raise ValueError("Length should be greater than 0")
  
      # TODO robustify when no unicodedat available
      if _use_unicode:
          _xobj = _xobj_unicode
      else:
          _xobj = _xobj_ascii
  
      vinfo = _xobj[symb]
  
      c1 = top = bot = mid = None
  
      if not isinstance(vinfo, tuple):  # 1 entry
          ext = vinfo
      else:
          if isinstance(vinfo[0], tuple):  # (vlong), c1
              vlong = vinfo[0]
              c1 = vinfo[1]
          else:  # (vlong), c1
              vlong = vinfo
  
          ext = vlong[0]
  
          try:
              top = vlong[1]
              bot = vlong[2]
              mid = vlong[3]
          except IndexError:
              pass
  
      if c1 is None:
          c1 = ext
      if top is None:
          top = ext
      if bot is None:
          bot = ext
      if mid is not None:
          if (length % 2) == 0:
              # even height, but we have to print it somehow anyway...
              # XXX is it ok?
              length += 1
  
      else:
          mid = ext
  
      if length == 1:
          return c1
  
      res = []
      next = (length - 2) // 2
      nmid = (length - 2) - next * 2
  
      res += [top]
      res += [ext] * next
      res += [mid] * nmid
      res += [ext] * next
      res += [bot]
  
      return res
  
imports: import sys
  import warnings
  from string import ascii_lowercase, ascii_uppercase
  import unicodedata
  from sympy.printing.conventions import split_super_sub
  from sympy.core.alphabets import greeks
  from sympy.utilities.exceptions import sympy_deprecation_warning
label_desc: Use image node_id 5 for calling a global function with example usage: xobj(symb, length) and returns: res, c1