code: def add_callback(self, f, *args, **kwargs):
      if args or kwargs:
          f = functools.partial(f, *args, **kwargs)
      if self.is_done and not self.exception:
          self._call_backs("callback", [f], self.value)
      else:
          self._callbacks.append(f)
      return self
  
file_path: kafka-python/kafka/future.py
imports: from __future__ import absolute_import
  import functools
  import logging
label_desc: Use image node_id 7 for calling the Future obj's underlying member method code with example usage: obj.add_callback(f) and returns: self