def table(self) -> Table:
        """
        Returns a SQLAlchemy :class:`Table` object. This is either the
        :class:`Table` object that was used for initialization, or one that
        was constructed from the ``tablename`` plus the ``metadata``.
        """
        if self._table is not None:
            return self._table
        assert self._metadata, (
            "Must specify metadata (in constructor or via set_metadata()/"
            "set_metadata_if_none() before you can get a Table from a "
            "tablename"
        )
        for table in self._metadata.tables.values():  # type: Table
            if table.name == self._tablename:
                return table
        raise ValueError("No table named {!r} is present in the "
                         "metadata".format(self._tablename))
Returns a SQLAlchemy :class:`Table` object. This is either the
        :class:`Table` object that was used for initialization, or one that
        was constructed from the ``tablename`` plus the ``metadata``.