code: def create_section(
          aggregation_summary, analysis_layer, postprocessor_fields,
          section_header,
          use_aggregation=True,
          units_label=None,
          use_rounding=True,
          extra_component_args=None):
      
      if use_aggregation:
          return create_section_with_aggregation(
              aggregation_summary, analysis_layer, postprocessor_fields,
              section_header,
              units_label=units_label,
              use_rounding=use_rounding,
              extra_component_args=extra_component_args)
      else:
          return create_section_without_aggregation(
              aggregation_summary, analysis_layer, postprocessor_fields,
              section_header,
              units_label=units_label,
              use_rounding=use_rounding,
              extra_component_args=extra_component_args)
docs: Create demographic section context.
  
      :param aggregation_summary: Aggregation summary
      :type aggregation_summary: qgis.core.QgsVectorlayer
  
      :param analysis_layer: Analysis layer
      :type analysis_layer: qgis.core.QgsVectorLayer
  
      :param postprocessor_fields: Postprocessor fields to extract
      :type postprocessor_fields: list[dict]
  
      :param section_header: Section header text
      :type section_header: qgis.core.QgsVectorLayer
  
      :param use_aggregation: Flag, if using aggregation layer
      :type use_aggregation: bool
  
      :param units_label: Unit label for each column
      :type units_label: list[str]
  
      :param use_rounding: flag for rounding, affect number representations
      :type use_rounding: bool
  
      :param extra_component_args: extra_args passed from report component
          metadata
      :type extra_component_args: dict
  
      :return: context for gender section
      :rtype: dict
  
      .. versionadded:: 4.0