def filter_entity(entity_ref):
 if entity_ref:
  entity_ref.pop('dn', None)
 return entity_ref

def filter_entity ( entity_ref ) : if entity_ref : entity_ref . pop ( 'dn' , None ) return entity_ref
filter out private items in an entity dict .