docs: private KeyPersonCompensationDataType getCompensation(KeyPersonDto keyPerson, int budgetPeriod) {
  
          KeyPersonCompensationDataType keyPersonCompensation = KeyPersonCompensationDataType.Factory.newInstance();
          ScaleTwoDecimal baseSalaryByPeriod;
          if (keyPerson != null) {
              if (keyPerson.getAcademicMonths() != null) {
                  keyPersonCompensation.setAcademicMonths(keyPerson.getAcademicMonths().bigDecimalValue());
              }
              if (keyPerson.getCalendarMonths() != null) {
                  keyPersonCompensation.setCalendarMonths(keyPerson.getCalendarMonths().bigDecimalValue());
              }
              if (keyPerson.getSummerMonths() != null) {
                  keyPersonCompensation.setSummerMonths(keyPerson.getSummerMonths().bigDecimalValue());
              }
              if (keyPerson.getFringe() != null) {
                  keyPersonCompensation.setFringeBenefits(keyPerson.getFringe().add(keyPerson.getFringeCostSharing() != null ? keyPerson.getFringeCostSharing() : ScaleTwoDecimal.ZERO).bigDecimalValue());
              }
              if (keyPerson.getRequestedSalary() != null) {
                  keyPersonCompensation.setRequestedSalary(keyPerson.getRequestedSalary().add(keyPerson.getCostSharingAmount() != null ? keyPerson.getCostSharingAmount() : ScaleTwoDecimal.ZERO).bigDecimalValue());
              }
              TotalDataType totalDataType = TotalDataType.Factory.newInstance();
              if (keyPerson.getFundsRequested() != null) {
                  totalDataType.setFederal(keyPerson.getFundsRequested().bigDecimalValue());
              }
              if (keyPerson.getNonFundsRequested() != null) {
                  totalDataType.setNonFederal(keyPerson.getNonFundsRequested().bigDecimalValue());
              }
              if (keyPerson.getFundsRequested() != null && keyPerson.getNonFundsRequested() != null) {
                  totalDataType.setTotalFedNonFed(keyPerson.getFundsRequested().add(keyPerson.getNonFundsRequested())
                          .bigDecimalValue());
              }
              keyPersonCompensation.setTotal(totalDataType);
              if (pdDoc.getDevelopmentProposal().getBudgets() != null) {
                  baseSalaryByPeriod = s2sBudgetCalculatorService.getBaseSalaryByPeriod(pdDoc.getDevelopmentProposal().getBudgets().get(0)
                          .getBudgetId(), budgetPeriod, keyPerson);
                  if (baseSalaryByPeriod != null) {
                      keyPersonCompensation.setBaseSalary(baseSalaryByPeriod.bigDecimalValue());
                  }
                  else {
                      if (keyPerson.getBaseSalary() != null) {
                          keyPersonCompensation.setBaseSalary(keyPerson.getBaseSalary().bigDecimalValue());
                      }
                  }
              }
              else {
                  if (keyPerson.getBaseSalary() != null) {
                      keyPersonCompensation.setBaseSalary(keyPerson.getBaseSalary().bigDecimalValue());
                  }
              }
          }
          return keyPersonCompensation;
      }