def get_manager(stream=None, counterclass=Counter, **kwargs):
stream = stream or sys.stdout<EOL>isatty = hasattr(stream, '<STR_LIT>') and stream.isatty()<EOL>kwargs['<STR_LIT>'] = isatty and kwargs.get('<STR_LIT>', True)<EOL>return Manager(stream=stream, counterclass=counterclass, **kwargs)<EOL>
Args:
    stream(:py:term:`file object`): Output stream. If :py:data:`None`,
        defaults to :py:data:`sys.stdout`
    counter_class(:py:term:`class`): Progress bar class (Default: :py:class:`Counter`)
    kwargs(dict): Any additional :py:term:`keyword arguments<keyword argument>`
        will passed to the manager class.

Returns:
    :py:class:`Manager`: Manager instance

Convenience function to get a manager instance

If ``stream`` is not attached to a TTY, the :py:class:`Manager` instance is disabled.