# Path: dsenser/utils.py
# def is_explicit(a_rel):
#     """Check whether given relation is explicit.
# 
#     Args:
#       a_rel (dict):
#        discourse relation to classify
# 
#     Returns:
#       bool:
#         ``True`` if the relation is explicit, ``False`` otherwise
# 
#     """
#     return bool(a_rel[CONNECTIVE][TOK_LIST])
# 
# class timeit(object):
#     """Decorator class for measuring time performance.
# 
#     Attributes:
#       msg (str): message to be printed on method invocation
# 
#     """
# 
#     def __init__(self, a_msg):
#         """Class constructor.
# 
#         Args:
#           a_msg (str): debug message to print
# 
#         """
#         self.msg = a_msg
# 
#     def __call__(self, a_func):
#         """Decorator function.
# 
#         Args:
#           a_func (method): decorated method
# 
#         Returns:
#           method: wrapped method
# 
#         """
#         def _wrapper(*args, **kwargs):
#             print(self.msg + " started", file=sys.stderr)
#             start_time = datetime.utcnow()
#             a_func(*args, **kwargs)
#             end_time = datetime.utcnow()
#             time_delta = (end_time - start_time).total_seconds()
#             print(self.msg + " finished ({:.2f} sec)".format(time_delta),
#                   file=sys.stderr)
#         return wraps(a_func)(_wrapper)


from dsenser.utils import is_explicit, timeit
import numpy as np
    def _free(self):
        """Free resources used by the model.

        Args:
        (void):

        Returns:
        (void):

        """
        del self.explicit
        del self.implicit

    def _divide_data(self, a_data):
        """Separate dataset into explicit and implicit instances.

        Args:
        a_data (2-tuple(dict, dict)):
        list of gold relations and dict with parses

        Returns:
        (2-tuple(list, list)):
          lists of explicit and implicit training instances

        """
        if a_data is None:
            return ((), ())
        explicit_instances = []
        implicit_instances = []
        for x_i, irel, y_i in a_data:

# Path: dsenser/utils.py
# def is_explicit(a_rel):
#     """Check whether given relation is explicit.
# 
#     Args:
#       a_rel (dict):
#        discourse relation to classify
# 
#     Returns:
#       bool:
#         ``True`` if the relation is explicit, ``False`` otherwise
# 
#     """
#     return bool(a_rel[CONNECTIVE][TOK_LIST])
# 
# class timeit(object):
#     """Decorator class for measuring time performance.
# 
#     Attributes:
#       msg (str): message to be printed on method invocation
# 
#     """
# 
#     def __init__(self, a_msg):
#         """Class constructor.
# 
#         Args:
#           a_msg (str): debug message to print
# 
#         """
#         self.msg = a_msg
# 
#     def __call__(self, a_func):
#         """Decorator function.
# 
#         Args:
#           a_func (method): decorated method
# 
#         Returns:
#           method: wrapped method
# 
#         """
#         def _wrapper(*args, **kwargs):
#             print(self.msg + " started", file=sys.stderr)
#             start_time = datetime.utcnow()
#             a_func(*args, **kwargs)
#             end_time = datetime.utcnow()
#             time_delta = (end_time - start_time).total_seconds()
#             print(self.msg + " finished ({:.2f} sec)".format(time_delta),
#                   file=sys.stderr)
#         return wraps(a_func)(_wrapper)


# Path: dsenser/judge/judge.py
from dsenser.utils import is_explicit, timeit
import numpy as np

    def _free(self):
        """Free resources used by the model.

        Args:
        (void):

        Returns:
        (void):

        """
        del self.explicit
        del self.implicit

    def _divide_data(self, a_data):
        """Separate dataset into explicit and implicit instances.

        Args:
        a_data (2-tuple(dict, dict)):
        list of gold relations and dict with parses

        Returns:
        (2-tuple(list, list)):
          lists of explicit and implicit training instances

        """
        if a_data is None:
            return ((), ())
        explicit_instances = []
        implicit_instances = []
        for x_i, irel, y_i in a_data:

            if is_explicit(irel):