def METHOD_NAME(session, project, entity):
    from dispatch.entity.models import EntityUpdate
    from dispatch.entity.service import update
    name = "Updated name"
    entity_in = EntityUpdate(
        id=entity.id, name=name, project=project, owner="example.com", external_id="foo"
    )
    entity = update(
        db_session=session,
        entity=entity,
        entity_in=entity_in,
    )
    assert entity.name == name