public function getSequence($choices, $length)
    {
        $length = (int) $length;

        if ($length < 0) {
            throw new \InvalidArgumentException('Invalid sequence length');
        }

        if (is_array($choices)) {
            return $this->getSequenceValues(array_values($choices), $length);
        }

        return implode($this->getSequenceValues(str_split((string) $choices), $length));
    }