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