code: def _get_settings(self):
          
          # If user-defined settings exist...
          if isdefined(self.inputs.settings):
              # Note this in the log and return those settings.
              NIWORKFLOWS_LOG.info('User-defined settings, overriding defaults')
              return self.inputs.settings
  
          # Define a prefix for output files based on the modality of the moving image.
          filestart = '{}-mni_registration_{}_'.format(
              self.inputs.moving.lower(), self.inputs.flavor)
  
          # Get a list of settings files that match the flavor.
          filenames = [i for i in pkgr.resource_listdir('niworkflows', 'data')
                       if i.startswith(filestart) and i.endswith('.json')]
          # Return the settings files.
          return [pkgr.resource_filename('niworkflows.data', f)
                  for f in sorted(filenames)]
docs: Return any settings defined by the user, as well as any pre-defined
          settings files that exist for the image modalities to be registered.