<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def derived_from_chain(self):
 """Returns all targets that this target was derived from. If this target was not derived from another, returns an empty sequence. :API: public """

    cur = self
    while cur.derived_from is not cur:
      cur = cur.derived_from
      yield cur