code: def get_division(self, obj):
          
          if self.context.get("division"):
              return DivisionSerializer(self.context.get("division")).data
          else:
              if obj.slug == "senate":
                  return DivisionSerializer(obj.jurisdiction.division).data
              else:
                  us = DivisionSerializer(obj.jurisdiction.division).data
  
                  us["children"] = [
                      DivisionSerializer(
                          state,
                          context={"children_level": DivisionLevel.DISTRICT},
                      ).data
                      for state in obj.jurisdiction.division.children.all()
                  ]
  
                  return us
docs: Division.