def mongodb_get_users():
    """Connects to mongodb and returns users collection"""
    # TODO parse: MONGOHQ_URL
    
    connection = Connection(env['MONGODB_HOST'], int(env['MONGODB_PORT']))
    if 'MONGODB_NAME' in env and 'MONGODB_PW' in env:
        connection[env['MONGODB_DBNAME']].authenticate(env['MONGODB_NAME'], env['MONGODB_PW'])
    return connection[env['MONGODB_DBNAME']].users
dataset/ETHPy150Open finnp/squarewheel/squarewheel.py/mongodb_get_users/original