<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_original_site(structure, site):
 """Private convenience method for get_nn_info, gives original site index from ProvidedPeriodicSite."""

        for i, s in enumerate(structure):
            if site.is_periodic_image(s):
                return i
        raise Exception('Site not found!')