docs: def get_resource_limits(self):
          """Get the core count and memory usage limits for this process.
  
          :return: A dictionary with the resource limits, containing the
              following keys:
  
              - ``memory``: Memory usage limit, in MB. Defaults to 4096 if
                not otherwise specified in the resource requirements.
              - ``cores``: Core count limit. Defaults to 1.
  
          :rtype: dict
          """
          # Get limit defaults and overrides.
          limit_defaults = getattr(settings, 'FLOW_PROCESS_RESOURCE_DEFAULTS', {})
          limit_overrides = getattr(settings, 'FLOW_PROCESS_RESOURCE_OVERRIDES', {})
  
          limits = {}
  
          resources = self.requirements.get('resources', {})  # pylint: disable=no-member
  
          limits['cores'] = int(resources.get('cores', 1))
  
          max_cores = getattr(settings, 'FLOW_PROCESS_MAX_CORES', None)
          if max_cores:
              limits['cores'] = min(limits['cores'], max_cores)
  
          memory = limit_overrides.get('memory', {}).get(self.slug, None)
          if memory is None:
              memory = int(resources.get(
                  'memory',
                  # If no memory resource is configured, check settings.
                  limit_defaults.get('memory', 4096)
              ))
          limits['memory'] = memory
  
          return limits