public static function createFromDataModel(ValueCollection $valueCollection)
    {
        $container = new static();
        foreach ($valueCollection as $value) {
            $fieldIdentifier = $value->getFieldIdentifier();

            if (!empty($fieldIdentifier)) {
                $container[$value->getFieldIdentifier()] = RuntimeUtils::valueToRuntime($value->getValue(), $value->getBaseType());
            } else {
                $msg = "Cannot include qtism\\data\\state\\Value '" . $value->getValue() . "' in the RecordContainer ";
                $msg .= "because it has no fieldIdentifier specified.";
                throw new InvalidArgumentException($msg);
            }
        }

        return $container;
    }