code: protected function calculate()
      {
          // Basic conditions.
          $this->addHierarchicalConditions();
          $this->addParentCondition();
  
          // Conditions for metamodels variants.
          $relationship = $this->getRootCondition();
          $relationship->setSetters(array_merge_recursive(
              [['property' => 'varbase', 'value' => '1']],
              $relationship->getSetters()
          ));
  
          $builder = FilterBuilder::fromArrayForRoot((array) $relationship->getFilterArray())->getFilter();
  
          $builder->andPropertyEquals('varbase', 1);
  
          $relationship->setFilterArray($builder->getAllAsArray());
  
          $setter  = [
              ['to_field' => 'varbase', 'value' => '0'],
              ['to_field' => 'vargroup', 'from_field' => 'vargroup']
          ];
          $inverse = [];
  
          /** @var ParentChildConditionInterface $relationship */
          $relationship = $this->definition->getChildCondition($this->container->getName(), $this->container->getName());
  
          if ($relationship === null) {
              $relationship = new ParentChildCondition();
              $relationship
                  ->setSourceName($this->container->getName())
                  ->setDestinationName($this->container->getName());
              $this->definition->addChildCondition($relationship);
          } else {
              $setter  = array_merge_recursive($setter, $relationship->getSetters());
              $inverse = array_merge_recursive($inverse, $relationship->getInverseFilterArray());
          }
  
          $relationship
              ->setFilterArray(
                  FilterBuilder::fromArray($relationship->getFilterArray())
                      ->getFilter()
                      ->getBuilder()
                      ->encapsulateOr()
                      ->andRemotePropertyEquals('vargroup', 'vargroup')
                      ->andRemotePropertyEquals('vargroup', 'id')
                      ->andRemotePropertyEquals('varbase', 0, true)
                      ->getAllAsArray()
              )
              ->setSetters($setter)
              ->setInverseFilterArray($inverse);
      }
docs: The real calculating function.
  
  @return void