code: def _getChar(self, char_spec):
          
          if len(char_spec) >= 4 and all(c in string.hexdigits for c in char_spec):
              char_number = int(char_spec, 16)
              if char_number not in range(0x110000):
                  raise ValueError('No such character')
              return chr(char_number)
          elif len(char_spec) == 1:
              return char_spec
          else:
              raise ValueError('No such character')
docs: Returns character from given code point or character.