def METHOD_NAME(self, client, portfolio):
    accounts = self.data.get('accounts')
    if accounts == 'matched':
        accounts = portfolio.get(CatalogPortfolioCrossAccount.annotation_key)
    for account in accounts:
        client.delete_portfolio_share(PortfolioId=portfolio['Id'], AccountId=account)