public function getClosestRequestingRootComponent(BaseGenerator $component) {
    if ($this->getComponentKey($component) === $this->rootGeneratorId) {
      throw new \LogicException("ComponentCollection::getClosestRequestingRootComponent() may not be called with the root component.");
    }

    $component_id = $this->getComponentKey($component);

    $closest_requesting_root_id = $this->requestRoots[$component_id];
    return $this->components[$closest_requesting_root_id];
  }