def filter_consumer(consumer_ref):
 if consumer_ref:
  consumer_ref = consumer_ref.copy()
  consumer_ref.pop('secret', None)
 return consumer_ref

def filter_consumer ( consumer_ref ) : if consumer_ref : consumer_ref = consumer_ref . copy ( ) consumer_ref . pop ( 'secret' , None ) return consumer_ref
filter out private items in a consumer dict .