code: def _remove_bound_conditions(agent, keep_criterion):
      
      new_bc = []
      for ind in range(len(agent.bound_conditions)):
          if keep_criterion(agent.bound_conditions[ind].agent):
              new_bc.append(agent.bound_conditions[ind])
      agent.bound_conditions = new_bc
docs: Removes bound conditions of agent such that keep_criterion is False.
  
      Parameters
      ----------
      agent: Agent
          The agent whose bound conditions we evaluate
      keep_criterion: function
          Evaluates removal_criterion(a) for each agent a in a bound condition
          and if it evaluates to False, removes a from agent's bound_conditions