<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_base(self, option):
 """ Parse the base command option. Can be supplied as a 3 character code or a settings variable name If base is not supplied, looks for settings CURRENCIES_BASE and SHOP_DEFAULT_CURRENCY """

        if option:
            if option.isupper():
                if len(option) > 3:
                    return getattr(settings, option), True
                elif len(option) == 3:
                    return option, True
            raise ImproperlyConfigured("Invalid currency code found: %s" % option)
        for attr in ('CURRENCIES_BASE', 'SHOP_DEFAULT_CURRENCY'):
            try:
                return getattr(settings, attr), True
            except AttributeError:
                continue
        return 'USD', False