<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fetch(self, crc):
 """ Try to get a hit in the cache, return None otherwise """

        cache_data = None
        pattern = '%08X.json' % crc
        hit = None

        for name in self._cache_files:
            if (name.endswith(pattern)):
                hit = name

        if (hit):
            try:
                cache = open(hit)
                cache_data = json.load(cache,
                                       object_hook=self._decoder)
                cache.close()
            except Exception as exp:
                logger.warning('Error while parsing cache file [%s]:%s',
                               hit, str(exp))

        return cache_data