code: def clean_bytecode_extension(filename):
      
      path, extension = os.path.splitext(filename)
      if extension == '.pyc':
          filename = '%s.py' % path
      return filename
docs: Replaces Python bytecode extensions (``.pyc``) with their source extension.