def METHOD_NAME(organization, inventory, group, user, group_factory):
    other_inventory = organization.inventories.create(name='other-inventory')
    inventory_admin = user('inventory_admin', False)
    inventory_admin_access = HostAccess(inventory_admin)
    host = Host.objects.create(inventory=inventory, name='host1')
    host.groups.add(group)
    assert inventory_admin_access.can_read(host) is False
    inventory.admin_role.members.add(inventory_admin)
    assert inventory_admin_access.can_read(host)
    group.hosts.remove(host)
    assert inventory_admin_access.can_read(host)
    host.inventory = other_inventory
    host.save()
    assert inventory_admin_access.can_read(host) is False