code: def wcwidth(wc, unicode_version="auto"):
      r"""
      Given one Unicode character, return its printable length on a terminal.
  
      :param str wc: A single Unicode character.
      :param str unicode_version: A Unicode version number, such as
          ``'6.0.0'``. A list of version levels suported by wcwidth
          is returned by :func:`list_versions`.
  
          Any version string may be specified without error -- the nearest
          matching version is selected.  When ``latest`` (default), the
          highest Unicode version level is used.
      :return: The width, in cells, necessary to display the character of
          Unicode string character, ``wc``.  Returns 0 if the ``wc`` argument has
          no printable effect on a terminal (such as NUL '\0'), -1 if ``wc`` is
          not printable, or has an indeterminate effect on the terminal, such as
          a control character.  Otherwise, the number of column positions the
          character occupies on a graphic terminal (1 or 2) is returned.
      :rtype: int
  
      See :ref:`Specification` for details of cell measurement.
      """
      ucs = ord(wc) if wc else 0
  
      # small optimization: early return of 1 for printable ASCII, this provides
      # approximately 40% performance improvement for mostly-ascii documents, with
      # less than 1% impact to others.
      if 32 <= ucs < 0x7F:
          return 1
  
      # C0/C1 control characters are -1 for compatibility with POSIX-like calls
      if ucs and ucs < 32 or 0x07F <= ucs < 0x0A0:
          return -1
  
      _unicode_version = _wcmatch_version(unicode_version)
  
      # Zero width
      if _bisearch(ucs, ZERO_WIDTH[_unicode_version]):
          return 0
  
      # 1 or 2 width
      return 1 + _bisearch(ucs, WIDE_EASTASIAN[_unicode_version])
  
file_path: catboost/contrib/python/wcwidth/py3/wcwidth/wcwidth.py
imports: from __future__ import division
  import os
  import sys
  import warnings
  from .table_vs16 import VS16_NARROW_TO_WIDE
  from .table_wide import WIDE_EASTASIAN
  from .table_zero import ZERO_WIDTH
  from .unicode_versions import list_versions
label_desc: Use image node_id 2 for calling a global function with example usage: wcwidth(wc, unicode_version) and returns: unknown, int, unknown, int