<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_codec(path):
 """Find the codec implementation for this path."""

    if '.' not in path or path.rfind('/') > path.rfind('.'):
        return Codec

    for endings, codec_class in FILE_ENDINGS:
        if any(path.endswith(e) for e in endings):
            log.debug('Using {0} codec: {1}'.format(endings, path))
            return codec_class

    return NoCodec