code: def GetCharacterDisplayWidth(char):
      """Returns the monospaced terminal display width of char.
  
      Assumptions:
        - monospaced display
        - ambiguous or unknown chars default to width 1
        - ASCII control char width is 1 => don't use this for control chars
  
      Args:
        char: The character to determine the display width of.
  
      Returns:
        The monospaced terminal display width of char: either 0, 1, or 2.
      """
      if not isinstance(char, six.text_type):
          # Non-unicode chars have width 1. Don't use this function on control chars.
          return 1
  
      # Normalize to avoid special cases.
      char = unicodedata.normalize("NFC", char)
  
      if unicodedata.combining(char) != 0:
          # Modifies the previous character and does not move the cursor.
          return 0
      elif unicodedata.category(char) == "Cf":
          # Unprintable formatting char.
          return 0
      elif unicodedata.east_asian_width(char) in "FW":
          # Fullwidth or Wide chars take 2 character positions.
          return 2
      else:
          # Don't use this function on control chars.
          return 1
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import unicode_literals
  import os
  import sys
  import unicodedata
  from fire.console import console_attr_os
  from fire.console import encoding
  from fire.console import text
  import six
label_desc: Use image node_id 3 for calling a global function with example usage: GetCharacterDisplayWidth(char) and returns: int, int, int, int, int