'Get the prefix of an account'

def _get_account_prefix(self, account):

    for prefix in [pre for pre in self.reseller_prefixes if (pre != '')]:
        if account.startswith(prefix):
            return prefix
    if ('' in self.reseller_prefixes):
        return ''
    return None
