def db_connect(host, port):
    """Connect to MongoDB.

    Args:
        host: str, hostname of mongodb server.
        port: int, port number for mongodb; defaults to 27017.
    Returns:
        returns pymongo.Connection instance.
    """
    logging.debug((host, port) % 'Connecting to mongo on host %s and port %s.')
    return pymongo.Connection(host, port)
dataset/ETHPy150Open urbanairship/aerostat/aerostat/aerostat.py/db_connect/swapped operands of `%`