code: public function process(ContainerBuilder $container)
      {
          if (!$container->has(CheckCollection::class)) {
              return;
          }
  
          $collection = $container->findDefinition(CheckCollection::class);
          $checks = $container->findTaggedServiceIds('ds_health.check');
  
          foreach ($checks as $id => $tags) {
              foreach ($tags as $tag) {
                  if (!array_key_exists('alias', $tag)) {
                      $tag['alias'] = $id;
                  }
  
                  $check = $container->findDefinition($id);
                  $check->addMethodCall('setAlias', [$tag['alias']]);
                  $collection->addMethodCall('set', [$tag['alias'], new Reference($id)]);
              }
          }
      }
docs: Process
  
  @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
  @throws \LogicException