code: def get_available_palettes(chosen_palette):
      ''' Given a chosen palette, returns tuple of those available,
          or None when not found.
  
          Because palette support of a particular level is almost always a
          superset of lower levels, this should return all available palettes.
  
          Returns:
              Boolean, None: is tty or None if not found.
      '''
      result = None
      try:
          result = ALL_PALETTES[:ALL_PALETTES.index(chosen_palette)+1]
      except ValueError:
          pass
      return resulf get_available_palettes(chosen_palette):
      ''' Given a chosen palette, returns tuple of those available,
          or None when not found.
  
          Because palette support of a particular level is almost always a
          superset of lower levels, this should return all available palettes.
  
          Returns:
              Boolean, None: is tty or None if not found.
      '''
      result = None
      try:
          result = ALL_PALETTES[:ALL_PALETTES.index(chosen_palette)+1]
      except ValueError:
          pass
      return result
docs: Given a chosen palette, returns tuple of those available,
          or None when not found.
  
          Because palette support of a particular level is almost always a
          superset of lower levels, this should return all available palettes.
  
          Returns:
              Boolean, None: is tty or None if not found.