<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_pool(module, max_conns, *args, **kwargs):
 """ Create a connection pool appropriate to the driver module's capabilities. """

    if not hasattr(module, 'threadsafety'):
        raise NotSupported("Cannot determine driver threadsafety.")
    if max_conns < 1:
        raise ValueError("Minimum number of connections is 1.")
    if module.threadsafety >= 2:
        return Pool(module, max_conns, *args, **kwargs)
    if module.threadsafety >= 1:
        return DummyPool(module, *args, **kwargs)
    raise ValueError("Bad threadsafety level: %d" % module.threadsafety)