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 Locale for the given locale code.
  
  If it is not supported, we raise an exception.
docstr_tok: ["Returns","the","Locale","for","the","given","locale","code",".","If","it","is","not","supported",",","we","raise","an","exception","."]
code: def get(cls, code: str) -> "Locale":
      """Returns the Locale for the given locale code.
  
      If it is not supported, we raise an exception.
      """
      if code not in cls._cache:
          assert code in _supported_locales
          translations = _translations.get(code, None)
          if translations is None:
              locale = CSVLocale(code, {})  # type: Locale
          elif _use_gettext:
              locale = GettextLocale(code, translations)
          else:
              locale = CSVLocale(code, translations)
          cls._cache[code] = locale
      return cls._cache[code]
  
imports: import codecs
  import csv
  import datetime
  import gettext
  import glob
  import os
  import re
  from tornado import escape
  from tornado.log import gen_log
  from tornado._locale_data import LOCALE_NAMES
  from typing import Iterable, Any, Union, Dict, Optional
label_desc: Use image node_id 2 for calling the Locale obj's underlying member method code with example usage: obj.get(cls, code) and returns: cls