<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_instance_property(instance, property_name):
 """Retrieves property of an instance, keeps retrying until getting a non-None"""


  name = get_name(instance)
  while True:
    try:
      value = getattr(instance, property_name)
      if value is not None:
        break
      print(f"retrieving {property_name} on {name} produced None, retrying")
      time.sleep(RETRY_INTERVAL_SEC)
      instance.reload()
      continue
    except Exception as e:
      print(f"retrieving {property_name} on {name} failed with {e}, retrying")
      time.sleep(RETRY_INTERVAL_SEC)
      try:
        instance.reload()
      except Exception:
        pass
      continue

  return value