code: def get_multicond_learned_conditioning(
      model, prompts, steps, hires_steps=None, use_old_scheduling=False
  ) -> MulticondLearnedConditioning:
      """same as get_learned_conditioning, but returns a list of ScheduledPromptConditioning along with the weight objects for each prompt.
      For each prompt, the list is obtained by splitting the prompt using the AND separator.
  
      https://energy-based-model.github.io/Compositional-Visual-Generation-with-Composable-Diffusion-Models/
      """
  
      (
          res_indexes,
          prompt_flat_list,
          prompt_indexes,
      ) = get_multicond_prompt_list(prompts)
  
      learned_conditioning = get_learned_conditioning(
          model,
          prompt_flat_list,
          steps,
          hires_steps,
          use_old_scheduling,
      )
  
      res = []
      for indexes in res_indexes:
          res.append(
              [
                  ComposableScheduledPromptConditioning(
                      learned_conditioning[i], weight
                  )
                  for i, weight in indexes
              ]
          )
  
      return MulticondLearnedConditioning(
          shape=(len(prompts),), batch=res
      )
  
imports: from __future__ import annotations
  import re
  from collections import namedtuple
  import lark
label_desc: Use image node_id 4 for calling a global function with example usage: get_multicond_learned_conditioning(model, prompts, steps, hires_steps, use_old_scheduling) and returns: MulticondLearnedConditioning