code: def get_duration(self, obj):
      if obj.experiment_end and obj.experiment_start:
          return obj.experiment_end - obj.experiment_start
  
      if not obj.experiment_end and obj.experiment_start:
          return timezone.now() - obj.experiment_start
  
      return None
  
file_path: modelchimp/modelchimp/serializers/experiment.py
imports: from rest_framework import serializers
  from modelchimp.models.experiment import Experiment
  from django.utils import timezone
label_desc: Use image node_id 7 for calling the ExperimentSerializer obj's underlying member method code with example usage: obj.get_duration(obj) and returns: None, unknown, unknown