code: def dict_pop(dict_, pop_keys, default=None):
      """Removes keys from a dict and returns their values.
  
      Args:
          dict_ (dict): A dictionary from which items are removed.
          pop_keys: A key or a list of keys to remove and return respective
              values or :attr:`default`.
          default (optional): Value to be returned when a key is not in
              :attr:`dict_`. The default value is `None`.
  
      Returns:
          A `dict` of the items removed from :attr:`dict_`.
      """
      if not isinstance(pop_keys, (list, tuple)):
          pop_keys = [pop_keys]
      ret_dict = {key: dict_.pop(key, default) for key in pop_keys}
      return ret_dict
  
imports: from typing import List, Union
  import inspect
  import funcsigs
  from pydoc import locate
  import copy
  import collections
  import numpy
  import tensorflow
  from texar.tf.hyperparams import HParams
  from texar.tf.utils.dtypes import is_str, is_callable, compat_as_text, _maybe_list_to_array
label_desc: Use image node_id 17 for calling a global function with example usage: dict_pop(dict_, pop_keys, default) and returns: ret_dict