private function removeSentinel(array $fields, array &$timestamps, array &$deletes, $path = '')
    {
        if ($path !== '') {
            $path .= '.';
        }

        foreach ($fields as $key => $value) {
            $currPath = $path . (string) $this->escapePathPart($key);
            if (is_array($value)) {
                $fields[$key] = $this->removeSentinel($value, $timestamps, $deletes, $currPath);
            } else {
                if ($value === FieldValue::deleteField() || $value === FieldValue::serverTimestamp()) {
                    if ($value === FieldValue::deleteField()) {
                        $deletes[] = $currPath;
                    }

                    if ($value === FieldValue::serverTimestamp()) {
                        $timestamps[] = $currPath;
                    }

                    unset($fields[$key]);
                }
            }
        }

        return $fields;
    }