class_docstr: Class for stateful representation of collections of streamlines
  Object designed to be identical no matter the file format
  (trk, tck, vtk, fib, dpy). Facilitate transformation between space and
  data manipulation for each streamline / point.
class_docstr_tok: ["Class","for","stateful","representation","of","collections","of","streamlines","Object","designed","to","be","identical","no","matter","the","file","format","(","trk",",","tck",",","vtk",",","fib",",","dpy",")",".","Facilitate","transformation","between","space","and","data","manipulation","for","each","streamline","\/","point","."]
docstr: Compatibility verification of two StatefulTractogram to ensure space,
  origin, data_per_point and data_per_streamline consistency 
docstr_tok: ["Compatibility","verification","of","two","StatefulTractogram","to","ensure","space",",","origin",",","data_per_point","and","data_per_streamline","consistency"]
code: def are_compatible(sft_1, sft_2):
      """Compatibility verification of two StatefulTractogram to ensure space,
      origin, data_per_point and data_per_streamline consistency"""
  
      are_sft_compatible = True
      if not is_header_compatible(sft_1, sft_2):
          logger.warning(
              "Inconsistent spatial attributes between both sft."
          )
          are_sft_compatible = False
  
      if sft_1.space != sft_2.space:
          logger.warning("Inconsistent space between both sft.")
          are_sft_compatible = False
      if sft_1.origin != sft_2.origin:
          logger.warning("Inconsistent origin between both sft.")
          are_sft_compatible = False
  
      if (
          sft_1.get_data_per_point_keys()
          != sft_2.get_data_per_point_keys()
      ):
          logger.warning(
              "Inconsistent data_per_point between both sft."
          )
          are_sft_compatible = False
      if (
          sft_1.get_data_per_streamline_keys()
          != sft_2.get_data_per_streamline_keys()
      ):
          logger.warning(
              "Inconsistent data_per_streamline between both sft."
          )
          are_sft_compatible = False
  
      return are_sft_compatible
  
imports: from bisect import bisect
  from collections import OrderedDict
  from copy import deepcopy
  import enum
  from itertools import product
  import logging
  from nibabel.affines import apply_affine
  from nibabel.streamlines.tractogram import Tractogram, PerArraySequenceDict, PerArrayDict
  import numpy
  from dipy.io.dpy import Streamlines
  from dipy.io.utils import get_reference_info, is_reference_info_valid, is_header_compatible
label_desc: Use image node_id 2 for calling the StatefulTractogram obj's underlying member method code with example usage: obj.are_compatible(sft_1, sft_2) and returns: are_sft_compatible