validate / deprecate formats; return the new kwargs

def _validate_format(self, format, kwargs):
        """ validate / deprecate formats; return the new 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