# Path: util/util_config.py
# def get_project_config(file_path=None):
#     if file_path is None:
#         file_path = join(dirname(abspath(__file__)), '../configs/project_config.cfg')
#     config = configparser.ConfigParser()
#     config.read(file_path)
#     assert 'Paths' in config
#     config_dict = {}
#     for k, v in config['Paths'].items():
#         config_dict[k] = v
#     return config_dict


from torch.multiprocessing import Pool
from os.path import join, dirname
from os import makedirs
from util.util_config import get_project_config
import atexit
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



class BaseVisualizer():
    """
    Async Visulization Worker
    """

    def __init__(self, n_workers=4):
        # read global configs

# Path: util/util_config.py
# def get_project_config(file_path=None):
#     if file_path is None:
#         file_path = join(dirname(abspath(__file__)), '../configs/project_config.cfg')
#     config = configparser.ConfigParser()
#     config.read(file_path)
#     assert 'Paths' in config
#     config_dict = {}
#     for k, v in config['Paths'].items():
#         config_dict[k] = v
#     return config_dict


# Path: visualize/base_visualizer.py
from torch.multiprocessing import Pool
from os.path import join, dirname
from os import makedirs
from util.util_config import get_project_config
import atexit

# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



class BaseVisualizer():
    """
    Async Visulization Worker
    """

    def __init__(self, n_workers=4):
        # read global configs

        self.cfg = get_project_config()