code: def _folder_item_calculation(self, analysis_brain, item):
          
  
          is_editable = self.is_analysis_edition_allowed(analysis_brain)
          # Set interim fields. Note we add the key 'formatted_value' to the list
          # of interims the analysis has already assigned.
          interim_fields = analysis_brain.getInterimFields or list()
          for interim_field in interim_fields:
              interim_keyword = interim_field.get('keyword', '')
              if not interim_keyword:
                  continue
              interim_value = interim_field.get('value', '')
              interim_formatted = formatDecimalMark(interim_value, self.dmk)
              interim_field['formatted_value'] = interim_formatted
              item[interim_keyword] = interim_field
              item['class'][interim_keyword] = 'interim'
  
              # Note: As soon as we have a separate content type for field
              #       analysis, we can solely rely on the field permission
              #       "senaite.core: Field: Edit Analysis Result"
              if is_editable:
                  if self.has_permission(FieldEditAnalysisResult, analysis_brain):
                      item['allow_edit'].append(interim_keyword)
  
              # Add this analysis' interim fields to the interim_columns list
              interim_hidden = interim_field.get('hidden', False)
              if not interim_hidden:
                  interim_title = interim_field.get('title')
                  self.interim_columns[interim_keyword] = interim_title
  
          item['interimfields'] = interim_fields
          self.interim_fields[analysis_brain.UID] = interim_fields
  
          # Set calculation
          calculation_uid = analysis_brain.getCalculationUID
          has_calculation = calculation_uid and True or False
          item['calculation'] = has_calculation
docs: Set the analysis' calculation and interims to the item passed in.
  
          :param analysis_brain: Brain that represents an analysis
          :param item: analysis' dictionary counterpart that represents a row