def hash_key(self, name, typ=None):
        """
        Set the hash key in KeySchema for the table or the active index.
        If you provide a second argument, :meth:`attribute_definition` will be called as well.