public static function generatePath(
        AttributeInterface $attribute,
        $additional_prefix = '',
        $extension = '',
        $uuid = null
    ) {
        $uuid = $uuid ? UuidGenerator::fromString($uuid) : UuidGenerator::uuid4();
        $uuid_string = $uuid->toString();
        $uuid_parts = $uuid->getClockSeqLow(); // 8 bit int => 256 folders

        $root_type = $attribute->getRootType();
        $root_type_name = $root_type->getName();
        if ($root_type instanceof EntityTypeInterface) {
            $root_type_name = $root_type->getPrefix();
        }

        $attribute_path = $attribute->getPath();

        $identifier = '';

        if (!empty($additional_prefix)) {
            $identifier = $additional_prefix . '/';
        }

        $identifier .= sprintf('%s/%s/%s/%s', $root_type_name, $attribute_path, $uuid_parts, $uuid_string);

        if (!empty($extension)) {
            $identifier .= '.' . $extension;
        }

        return $identifier;
    }