code: private function prepareInputScreen($modelName, $screen): array
      {
          if (null === $metaModel = $this->factory->getMetaModel($modelName)) {
              throw new \InvalidArgumentException('Could not retrieve MetaModel ' . $modelName);
          }
          $caption     = ['' => $metaModel->getName()];
          $description = ['' => $metaModel->getName()];
          foreach (StringUtil::deserialize($screen['backendcaption'], true) as $languageEntry) {
              $langCode               = $languageEntry['langcode'];
              $caption[$langCode]     = !empty($label = $languageEntry['label']) ? $label : $caption[''];
              $description[$langCode] = !empty($title = $languageEntry['description']) ? $title : $description[''];
              if ($metaModel->getFallbackLanguage() === $langCode) {
                  $caption['']     = $label;
                  $description[''] = $title;
              }
          }
  
          $result = [
              'meta'        => $screen,
              'properties'  => $this->fetchPropertiesFor($screen['id'], $metaModel),
              'conditions'  => $this->fetchConditions($screen['id']),
              'groupSort'   => $this->fetchGroupSort($screen['id'], $metaModel),
              'label'       => $caption,
              'description' => $description
          ];
  
          $bySetting         = $this->buildConditionTree($result['conditions']);
          $result['legends'] = $this->convertLegends($result['properties'], $metaModel, $bySetting);
  
          return $result;
      }
docs: Prepare the input screen data.
  
  @param string $modelName The MetaModel name.
  @param array  $screen    The screen meta data.
  
  @return array
  
  @throws \InvalidArgumentException When the MetaModel can not be retrieved.