public function getRetryDelay()
    {
        $metadata = array_filter($this->metadata, function ($metadataItem) {
            return array_key_exists('retryDelay', $metadataItem);
        });

        if (count($metadata) === 0) {
            return ['seconds' => 0, 'nanos' => 0];
        }

        return $metadata[0]['retryDelay'] + [
            'seconds' => 0,
            'nanos' => 0
        ];
    }