<commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
TODO: add me
"""
from __future__ import unicode_literals

import json
import logging

from django.utils.duration import duration_string
from rest_framework import serializers

from .fields import CustomRelatedField

LOG = logging.getLogger(__name__)

try:
    from courseware import courses  # pylint: disable=import-error
    from lms.djangoapps.grades.new.course_grade import CourseGradeFactory  # pylint: disable=import-error
except ImportError, e:
    LOG.error("One or more imports failed for `edunext.serializers`. Details on debug level.")
    LOG.debug(e, exc_info=True)


class MetaSerializer(serializers.Serializer):  # pylint: disable=abstract-method
    """Serializer for the blob information in the meta attibute, will return a
    a default dict with empty values if the user does not have the information available

    """
    def to_representation(self, obj):
        # Add all the possible fields
        _fields = {
            'personal_id': None,
        }
        try:<commit_msg>changing path of the CourseGradeFactory import according to ginkgo<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
TODO: add me
"""
from __future__ import unicode_literals

import json
import logging

from django.utils.duration import duration_string
from rest_framework import serializers

from .fields import CustomRelatedField

LOG = logging.getLogger(__name__)

try:
    from courseware import courses  # pylint: disable=import-error
    from lms.djangoapps.grades.new.course_grade_factory import CourseGradeFactory  # pylint: disable=import-error
except ImportError, e:
    LOG.error("One or more imports failed for `edunext.serializers`. Details on debug level.")
    LOG.debug(e, exc_info=True)


class MetaSerializer(serializers.Serializer):  # pylint: disable=abstract-method
    """Serializer for the blob information in the meta attibute, will return a
    a default dict with empty values if the user does not have the information available

    """
    def to_representation(self, obj):
        # Add all the possible fields
        _fields = {
            'personal_id': None,
        }
        try:
{'fraction_non_alphanumeric': 0.08139003200731595, 'fraction_numerical': 0.0009144947416552355, 'mean_word_length': 3.766884531590414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4662872', 'n_tokens_mistral': 612, 'n_tokens_neox': 590, 'n_words': 207}