<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def currency_iso_code(self, allow_random: bool = False) -> str: """Get code of the currency for current locale. :param allow_random: Get a random ISO code. :return: Currency code. """

        if allow_random:
            return self.random.choice(CURRENCY_ISO_CODES)
        else:
            return self._data['currency-code']