<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_vrf(self, auth, spec, prefix = 'vrf_'):
 """ Get a VRF based on prefix spec Shorthand function to reduce code in the functions below, since more or less all of them needs to perform the actions that are specified here. The major difference to :func:`list_vrf` is that we always return results - empty results if no VRF is specified in prefix spec. """


        # find VRF from attributes vrf, vrf_id or vrf_name
        vrf = []
        if prefix + 'id' in spec:
            # if None, mangle it to being 0, ie our default VRF
            if spec[prefix + 'id'] is None:
                spec[prefix + 'id'] = 0
            vrf = self.list_vrf(auth, { 'id': spec[prefix + 'id'] })
        elif prefix + 'rt' in spec:
            vrf = self.list_vrf(auth, { 'rt': spec[prefix + 'rt'] })
        elif prefix + 'name' in spec:
            vrf = self.list_vrf(auth, { 'name': spec[prefix + 'name'] })
        else:
            # no VRF specified - return VRF "default"
            vrf = self.list_vrf(auth, { 'id': 0 })

        if len(vrf) > 0:
            return vrf[0]

        raise NipapNonExistentError('No matching VRF found.')