def _should_patch_gevent(args, gevent_commands):
    should_patch = False
    for gevent_command in gevent_commands:
        should_patch = args[1] == gevent_command.command
        if gevent_command.contains:
            should_patch = should_patch and gevent_command.contains in ' '.join(args)
        if should_patch:
            break
    return should_patch
dataset/ETHPy150Open dimagi/commcare-hq/manage.py/_should_patch_gevent/original