code: def get_param_fields(self, obj):
      param_list = self.context.get("param_fields", [])
      result = dict()
      if not isinstance(obj.parameters, dict):
          return result
  
      for param in param_list:
          param_value = obj.parameters.get(param, None)
          if param_value:
              result[param] = param_value
  
      return result
  
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 5 for calling the ExperimentSerializer obj's underlying member method code with example usage: obj.get_param_fields(obj) and returns: result, result