<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _parse_plugin_id(self, plugin_id):
 """Determine repository from plugin id."""

        m = re.match("(.+)(_\d{4}_\d{2}_\d{2}_)(.+)", plugin_id)
        if m:
            return m.group(1)
        m = re.match("(.+)(_release_)(.+)", plugin_id)
        if m:
            return m.group(1)

        raise RuntimeError("Repository could not be determined from "
                           "the upgrade identifier: %s." % plugin_id)