code: def fallback_feature(func):
      """Decorator to fallback to `batch_feature` in FeatureModality"""
  
      def wrapper(self, *args, **kwargs):
          if self.features is not None:
              ids = args[0] if len(args) > 0 else kwargs["batch_ids"]
              return FeatureModality.batch_feature(self, batch_ids=ids)
          else:
              return func(self, *args, **kwargs)
  
      return wrapper
  
file_path: cornac/cornac/data/modality.py
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: fallback_feature(func) and returns: wrapper, FeatureModality, func