code: def parse_version(raw_info):
      # info is like: "== mrconvert 0.3.15-githash"
      for line in raw_info.splitlines():
          if line.startswith("== mrconvert "):
              v_string = line.split()[2]
              break
      else:
          return None
  
      # -githash may or may not be appended
      v_string = v_string.split("-")[0]
  
      return ".".join(v_string.split(".")[:3])
  
file_path: nipype/nipype/interfaces/mrtrix3/base.py
imports: from looseversion import LooseVersion
  from ...None import logging
  from ...utils.filemanip import which
  from ..base import CommandLineInputSpec, CommandLine, traits, File, isdefined, PackageInfo
label_desc: Use image node_id 1 for calling the Info obj's underlying member method code with example usage: obj.parse_version(raw_info) and returns: str, None