def option_repr(option, value):
            """Fix options whose __repr__ isn't usable in a constructor."""
            if option == 'document_class':
                if value is dict:
                    return 'document_class=dict'
                else:
                    return 'document_class=%s.%s' % (value.__module__,
                                                     value.__name__)
            if option in common.TIMEOUT_OPTIONS and value is not None:
                return "%s=%s" % (option, int(value * 1000))

            return '%s=%r' % (option, value)
Fix options whose __repr__ isn't usable in a constructor.
stackoverflow/venv/lib/python3.6/site-packages/pymongo/mongo_client.py