'Load all available table definitions from the database.
Automatically creates ``Table`` entries in this ``MetaData`` for any
table available in the database but not yet present in the
``MetaData``.  May be called multiple times to pick up tables recently
added to the database, however no special action is taken if a table
in this ``MetaData`` no longer exists in the database.
:param bind:
A :class:`.Connectable` used to access the database; if None, uses
the existing bind on this ``MetaData``, if any.
:param schema:
Optional, query and reflect tables from an alterate schema.
If None, the schema associated with this :class:`.MetaData`
is used, if any.
:param views:
If True, also reflect views.
:param only:
Optional.  Load only a sub-set of available named tables.  May be
specified as a sequence of names or a callable.
If a sequence of names is provided, only those tables will be
reflected.  An error is raised if a table is requested but not
available.  Named tables already present in this ``MetaData`` are
ignored.
If a callable is provided, it will be used as a boolean predicate to
filter the list of potential table names.  The callable is called
with a table name and this ``MetaData`` instance as positional
arguments and should return a true value for any table to reflect.
:param extend_existing: Passed along to each :class:`.Table` as
:paramref:`.Table.extend_existing`.
.. versionadded:: 0.9.1
:param autoload_replace: Passed along to each :class:`.Table` as
:paramref:`.Table.autoload_replace`.
.. versionadded:: 0.9.1
:param \**dialect_kwargs: Additional keyword arguments not mentioned above are
dialect specific, and passed in the form ``<dialectname>_<argname>``.
See the documentation regarding an individual dialect at
:ref:`dialect_toplevel` for detail on documented arguments.
.. versionadded:: 0.9.2 - Added :paramref:`.MetaData.reflect.**dialect_kwargs`
to support dialect-level reflection options for all :class:`.Table`
objects reflected.'

def reflect(self, bind=None, schema=None, views=False, only=None, extend_existing=False, autoload_replace=True, **dialect_kwargs):

    if (bind is None):
        bind = _bind_or_error(self)
    with bind.connect() as conn:
        reflect_opts = {'autoload': True, 'autoload_with': conn, 'extend_existing': extend_existing, 'autoload_replace': autoload_replace}
        reflect_opts.update(dialect_kwargs)
        if (schema is None):
            schema = self.schema
        if (schema is not None):
            reflect_opts['schema'] = schema
        available = util.OrderedSet(bind.engine.table_names(schema, connection=conn))
        if views:
            available.update(bind.dialect.get_view_names(conn, schema))
        if (schema is not None):
            available_w_schema = util.OrderedSet([('%s.%s' % (schema, name)) for name in available])
        else:
            available_w_schema = available
        current = set(self.tables)
        if (only is None):
            load = [name for (name, schname) in zip(available, available_w_schema) if (extend_existing or (schname not in current))]
        elif util.callable(only):
            load = [name for (name, schname) in zip(available, available_w_schema) if ((extend_existing or (schname not in current)) and only(name, self))]
        else:
            missing = [name for name in only if (name not in available)]
            if missing:
                s = ((schema and ("    schema    '%s'" % schema)) or '')
                raise exc.InvalidRequestError(('Could    not    reflect:    requested    table(s)    not    available    in    %s%s:    (%s)' % (bind.engine.url, s, ',    '.join(missing))))
            load = [name for name in only if (extend_existing or (name not in current))]
        for name in load:
            Table(name, self, **reflect_opts)
