docs: def main(conversion_type, input_pyc, output_pyc):
      """Convert Python bytecode from one version to another.
  
      INPUT_PYC contains the input bytecode path name
      OUTPUT_PYC  contians the output bytecode path name if supplied
      The --conversion type option specifies what conversion to do.
  
      Note: there are a very limited set of conversions currently supported.
      Help out and write more!"""
  
      shortname = osp.basename(input_pyc)
      if shortname.endswith('.pyc'):
          shortname = shortname[:-4]
      src_version = conversion_to_version(conversion_type, is_dest=False)
      dest_version = conversion_to_version(conversion_type, is_dest=True)
      if output_pyc is None:
          output_pyc = "%s-%s.pyc" % (shortname, dest_version)
  
      if conversion_type in UPWARD_COMPATABLE:
          copy_magic_into_pyc(input_pyc, output_pyc, src_version, dest_version)
          return
      temp_asm = NamedTemporaryFile('w', suffix='.pyasm', prefix=shortname, delete=False)
      (filename, co, version,
       timestamp, magic_int) = disassemble_file(input_pyc, temp_asm, asm_format=True)
      temp_asm.close()
      assert version == float(src_version), (
          "Need Python %s bytecode; got bytecode for version %s" %
          (src_version, version))
      asm = asm_file(temp_asm.name)
      new_asm = transform_asm(asm, conversion_type, src_version, dest_version)
      os.unlink(temp_asm.name)
      write_pycfile(output_pyc, new_asm)