<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def copy_reference(resource, doc, env, *args, **kwargs):
 """A row-generating function that yields from a reference. This permits an upstream package to be copied and modified by this package, while being formally referenced as a dependency The function will generate rows from a reference that has the same name as the resource term """


    yield from doc.reference(resource.name)