<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resource_name(self, resource):
 """ Return the name of the file within the reference package for a particular named resource. """

        if not(resource in self.contents['files']):
            raise ValueError("No such resource %r in refpkg" % (resource,))
        return self.contents['files'][resource]