code: def _define_variant(self):
          
          space = None
          variants = {
              # to be expanded once addtional spaces are supported
              'space1': ['fsaverage5', 'MNI152NLin2009cAsym'],
              'space2': ['fsaverage6', 'MNI152NLin2009cAsym'],
          }
          for sp, targets in variants.items():
              if all(target in targets for target in
                      [self.inputs.surface_target, self.inputs.volume_target]):
                  space = sp
          if space is None:
              raise NotImplementedError
  
          variant_key = os.path.abspath('dtseries_variant.json')
          with open(variant_key, 'w') as fp:
              json.dump({space: variants[space]}, fp)
          return variant_key, space
docs: Assign arbitrary label to combination of CIFTI spaces