# Path: util/logger.py
# class _MyFormatter(logging.Formatter):
#     def format(self, record):
# def set_file_handler(path=None, prefix='', time_str=''):
# _LOGGING_METHOD = ['info', 'warning', 'error', 'critical',
#                    'warn', 'exception', 'debug']


import init_path
import numpy as np
from util import logger
from . import mujoco_parser
    return node_info


def evo_ob_size_dict(node_info):
    ''' for each node type, collect the ob size
    for the evolution fish environment, everything should be fixed
    '''
    raise NotImplementedError
    node_info['ob_size_dict'] = {}

    for node_type in node_info['node_type_dict']:

        node_id_list = node_info['node_type_dict'][node_type]

        node_ob_size = [
            len(node_info['input_dict'][node_id])
            for node_id in node_id_list
        ]

        # assumes all the nodes of the same type has the same ob size
        assert node_ob_size.count(node_ob_size[0]) == len(node_ob_size), \
            logger.error('Nodes (type {}) have wrong ob size: {}!'.format(
                node_type, node_ob_size
            ))
        node_info['ob_size_dict'] = len(node_info['input_dict'][node_id_list[0]])

    return node_info


def get_inverse_type_offset(node_info, mode):

# Path: util/logger.py
# class _MyFormatter(logging.Formatter):
#     def format(self, record):
# def set_file_handler(path=None, prefix='', time_str=''):
# _LOGGING_METHOD = ['info', 'warning', 'error', 'critical',
#                    'warn', 'exception', 'debug']


# Path: graph_util/gnn_util.py
import init_path
import numpy as np
from util import logger
from . import mujoco_parser

    return node_info


def evo_ob_size_dict(node_info):
    ''' for each node type, collect the ob size
    for the evolution fish environment, everything should be fixed
    '''
    raise NotImplementedError
    node_info['ob_size_dict'] = {}

    for node_type in node_info['node_type_dict']:

        node_id_list = node_info['node_type_dict'][node_type]

        node_ob_size = [
            len(node_info['input_dict'][node_id])
            for node_id in node_id_list
        ]

        # assumes all the nodes of the same type has the same ob size
        assert node_ob_size.count(node_ob_size[0]) == len(node_ob_size), \
            logger.error('Nodes (type {}) have wrong ob size: {}!'.format(
                node_type, node_ob_size
            ))
        node_info['ob_size_dict'] = len(node_info['input_dict'][node_id_list[0]])

    return node_info


def get_inverse_type_offset(node_info, mode):

    assert mode in ['output', 'node'], logger.error(