protected function getMetaModelByModelPid(ModelInterface $model)
    {
        $metaModel = $this
            ->factory
            ->getMetaModel(
                $this->factory->translateIdToMetaModelName($model->getProperty('pid'))
            );

        if ($metaModel === null) {
            throw new \InvalidArgumentException('Could not retrieve MetaModel ' . $model->getProperty('pid'));
        }

        return $metaModel;
    }