def hydrate_target(hydrated_struct):
  target_adaptor = hydrated_struct.value
  """Construct a HydratedTarget from a TargetAdaptor and hydrated versions of its adapted fields."""
  # Hydrate the fields of the adaptor and re-construct it.
  hydrated_fields = yield [Get(HydratedField, HydrateableField, fa)
                           for fa in target_adaptor.field_adaptors]
  kwargs = target_adaptor.kwargs()
  for field in hydrated_fields:
    kwargs[field.name] = field.value
  yield HydratedTarget(target_adaptor.address,
                        TargetAdaptor(**kwargs),
                        tuple(target_adaptor.dependencies))
Construct a HydratedTarget from a TargetAdaptor and hydrated versions of its adapted fields.