class_docstr: Object representing a locale.
  
  After calling one of `load_translations` or `load_gettext_translations`,
  call `get` or `get_closest` to get a Locale object.
docstr: Returns the closest match for the given locale code.
docstr_tok: ["Returns","the","closest","match","for","the","given","locale","code","."]
code: def get_closest(cls, *locale_codes):
      """Returns the closest match for the given locale code."""
      for code in locale_codes:
          if not code:
              continue
          code = code.replace("-", "_")
          parts = code.split("_")
          if len(parts) > 2:
              continue
          elif len(parts) == 2:
              code = parts[0].lower() + "_" + parts[1].upper()
          if code in _supported_locales:
              return cls.get(code)
          if parts[0].lower() in _supported_locales:
              return cls.get(parts[0].lower())
      return cls.get(_default_locale)
  
imports: from __future__ import absolute_import, division, print_function
  import codecs
  import csv
  import datetime
  from io import BytesIO
  import numbers
  import os
  import re
  from tornado import escape
  from tornado.log import gen_log
  from tornado.util import PY3
  from tornado._locale_data import LOCALE_NAMES
label_desc: Use image node_id 1 for calling the Locale obj's underlying member method code with example usage: obj.get_closest(cls) and returns: cls, cls, cls