def load_accounts(self, reload=False, params={}):
    if reload:
        self.accounts = self.fetch_accounts(params)
    elif self.accounts:
        return self.accounts
    else:
        self.accounts = self.fetch_accounts(params)
    self.accountsById = self.index_by(self.accounts, 'id')
    return self.accounts
def load_accounts(self, reload=False, params={}):
    if reload:
        self.accounts = self.fetch_accounts(params)
    elif self.accounts:
        return self.accounts
    else:
        self.accounts = self.fetch_accounts(params)
    self.accountsById = self.index_by(self.accounts, 'id')
    return self.accounts