def FromProperty(prop):
  """Get a default value from a property.

  Args:
    prop: properties._Property, The property to fetch.

  Returns:
    A niladic function that fetches the property.
  """
  def DefaultFunc():
    return prop.Get(required=True)
  return DefaultFunc