def _set_access_controls(test_with_baton: TestWithBaton, path: str, access_controls: Iterable[AccessControl]):
    """
    Sets the given access controls on the entity at the given iRODS path.
    :param test_with_baton: framework to allow testing with baton
    :param path: the path of the entity
    :param access_controls: the access control list the entity should have
    """
    setup_helper = SetupHelper(test_with_baton.icommands_location)
    user = test_with_baton.irods_server.users[0]
    user_with_zone = "%s#%s" % (user.username, user.zone)
    setup_helper.set_access(user_with_zone, AccessLevel.NONE, path)
    for access_control in access_controls:
        setup_helper.set_access(str(access_control.user), _access_level_conversion[access_control.level], path)