code: private function getOrCreatePaletteDefinition(IMetaModelDataDefinition $container)
      {
          if ($container->hasDefinition(PalettesDefinitionInterface::NAME)) {
              return $container->getDefinition(PalettesDefinitionInterface::NAME);
          }
          $container->setDefinition(
              PalettesDefinitionInterface::NAME,
              $palettesDefinition = new DefaultPalettesDefinition()
          );
  
          return $palettesDefinition;
      }
docs: Retrieve or create the palette definition.
  
  @param IMetaModelDataDefinition $container The container.
  
  @return DefaultPalettesDefinition|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\DefinitionInterface