def get_json_attr(obj):
  if hasattr(obj, "to_json"):
    return getattr(obj, "to_json")()
  else:
    return obj
Extract _ConsumerDeliveryEvt objects destined for the given consumer
dataset/ETHPy150Open ucb-sts/sts/sts/util/convenience.py/get_json_attr--crossover with--dataset/ETHPy150Open pika/pika/pika/adapters/blocking_connection.py/BlockingChannel._remove_pending_deliveries