old_contents: from rest_framework.serializers import ModelSerializer
  from .models import *
  
  
  class MetricSerializer(ModelSerializer):
      class Meta:
          model = Metric
  
new_contents: from rest_framework.serializers import ModelSerializer, CharField
  from .models import *
  from .formula import validate_formula
  
  
  class MetricSerializer(ModelSerializer):
  
      formula = CharField(validators=[ validate_formula ])
  
      class Meta:
          model = Metric
  
subject: Add formula validator