code: def len(self, text):
          
          if not isinstance(text, str):
              return len(text)
  
          return sum(self._EAW_MAP.get(east_asian_width(c), self.ambiguous_width)
                     for c in text)
docs: Calculate display width considering unicode East Asian Width