couldn’t this be shortened to

    val p = if (...) ShardRegion.props(entryProps.get, _, _, _, _, _ _) else ShardRegion.proxyProps _
    context.actorOf(p(Role, coordinatorPath, ...)