<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_prefix(self, name):
 """ Retrieve a prefix, resolving the current one if needed Args: name(str):
 name of the prefix to retrieve, or current to get the current one Returns: self.prefix_class: instance of the prefix with the given name """

        if name == 'current':
            name = self.current

        try:
            return self.prefixes[name]
        except KeyError:
            raise KeyError(
                'Unable to find prefix "%s" in workdir %s' % (name, self.path)
            )