<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def CompleteHuntIfExpirationTimeReached(hunt_obj):
 """Marks the hunt as complete if it's past its expiry time."""

  # TODO(hanuszczak): This should not set the hunt state to `COMPLETED` but we
  # should have a sparate `EXPIRED` state instead and set that.
  if (hunt_obj.hunt_state not in [
      rdf_hunt_objects.Hunt.HuntState.STOPPED,
      rdf_hunt_objects.Hunt.HuntState.COMPLETED
  ] and hunt_obj.expired):
    StopHunt(hunt_obj.hunt_id, reason="Hunt completed.")

    data_store.REL_DB.UpdateHuntObject(
        hunt_obj.hunt_id, hunt_state=hunt_obj.HuntState.COMPLETED)
    return data_store.REL_DB.ReadHuntObject(hunt_obj.hunt_id)

  return hunt_obj