code: def _validate_format(self, format, kwargs):
          
          kwargs = kwargs.copy()
  
          # validate
          try:
              kwargs['format'] = _FORMAT_MAP[format.lower()]
          except KeyError:
              raise TypeError("invalid HDFStore format specified [{0}]"
                              .format(format))
  
          return kwargs
docs: validate / deprecate formats; return the new kwargs