def get_metadata(name, default=None):
  metadata_ref = get_metadata_ref(name)
  if metadata_ref:
    value = metadata_ref.get_value()
    return value
  if default is None:
    try:
      default = getattr(settings, name)
    except __HOLE__:
      logging.warning("AttributeError, %s is not in settings" % name)
  return default
dataset/ETHPy150Open CollabQ/CollabQ/common/util.py/get_metadata