public function createLanguage(
        string $slug,
        string $langCode,
        array $coordinators,
        array $options = [],
        bool $skipInvalidUsername = false
    ): ResponseInterface {
        // Make sure the $coordinators array is not empty
        if (!\count($coordinators)) {
            throw new \InvalidArgumentException('The coordinators array must contain at least one username.');
        }

        $uri = $this->createUri("/api/2/project/$slug/languages/");

        if ($skipInvalidUsername) {
            $uri = $uri->withQuery('skip_invalid_username');
        }

        // Build the required request data.
        $data = [
            'language_code' => $langCode,
            'coordinators'  => $coordinators,
        ];

        // Valid options to check
        $validOptions = ['translators', 'reviewers', 'list'];

        // Loop through the valid options and if we have them, add them to the request data
        foreach ($validOptions as $option) {
            if (isset($options[$option])) {
                $data[$option] = $options[$option];
            }
        }

        $request = $this->createRequest('POST', $uri);
        $request = $request->withBody($this->streamFactory->createStream(\json_encode($data)));

        return $this->client->sendRequest($request);
    }