docs: private Role calculateRole() {
          boolean isPartitionOwner = partitionService.isPartitionOwner(partitionId);
          boolean isMapNamePartition = partitionId == mapNamePartition;
          boolean isMapNamePartitionFirstReplica = false;
          if (hasBackup && isMapNamePartition) {
              IPartition partition = partitionService.getPartition(partitionId);
              Address firstReplicaAddress = partition.getReplicaAddress(1);
              Member member = clusterService.getMember(firstReplicaAddress);
              if (member != null) {
                  isMapNamePartitionFirstReplica = member.localMember();
              }
          }
          return assignRole(isPartitionOwner, isMapNamePartition, isMapNamePartitionFirstReplica);
      }