code: def to_string(self, fmt="{:.4f}"):
      result_str = ""
      list_space = ["com_ref", "com_seg", "list_labels"]
      for key in self.measures:
          result = self.m_dict[key][0]()
          if key in list_space:
              result_str += (
                  " ".join(fmt.format(x) for x in result)
                  if isinstance(result, tuple)
                  else fmt.format(result)
              )
          else:
              result_str += (
                  ",".join(fmt.format(x) for x in result)
                  if isinstance(result, tuple)
                  else fmt.format(result)
              )
          result_str += ","
      return result_str[:-1]
  
imports: from __future__ import absolute_import, print_function
  import numpy
  from scipy import ndimage
  from niftynet.utilities.util_common import MorphologyOps, CacheFunctionOutput
label_desc: Use image node_id 45 for calling the PairwiseMeasures obj's underlying member method code with example usage: obj.to_string(fmt) and returns: result_str