# Path: geetools/tools/string.py
# def eq(string, to_compare):
# def format(string, replacement):
#     def addFormat(st):
#         def true():
#         def false():
#     def formatValues(k, val):
#         def true(v):
#         def false(v):
#     def wrap(kv, ini):
# def _zip(l1, l2):
#     def wrap(el):
# def mix(strings):
#     def wrap(eelist, aggregate):


import pandas as pd
import ee
import threading
from copy import deepcopy
from .tools import string
    from collections import namedtuple

    for key, val in thedict.items():
        if not isinstance(key, str):
            msg = 'dict keys must be strings not {}'
            raise ValueError(msg.format(key.__class__))

        if not isinstance(val, dict):
            # workaround to include a dict as an attribute
            if isinstance(val, list):
                if isinstance(val[0], dict):
                    val = val[0]

            setattr(thenametuple, key, val)
        else:
            newname = dict2namedtuple(val, key)
            setattr(thenametuple, key, newname)

    return thenametuple


def formatVisParams(visParams):
    """ format visualization parameters to match EE requirements at
    ee.data.getMapId """
    formatted = dict()
    for param, value in visParams.items():
        if isinstance(value, list):
            value = [str(v) for v in value]
        if param in ['bands', 'palette']:
            formatted[param] = ','.join(value) if len(value) == 3 else str(value[0])
        if param in ['min', 'max', 'gain', 'bias', 'gamma']:

# Path: geetools/tools/string.py
# def eq(string, to_compare):
# def format(string, replacement):
#     def addFormat(st):
#         def true():
#         def false():
#     def formatValues(k, val):
#         def true(v):
#         def false(v):
#     def wrap(kv, ini):
# def _zip(l1, l2):
#     def wrap(el):
# def mix(strings):
#     def wrap(eelist, aggregate):


# Path: geetools/utils.py
import pandas as pd
import ee
import threading
from copy import deepcopy
from .tools import string
    from collections import namedtuple


    for key, val in thedict.items():
        if not isinstance(key, str):
            msg = 'dict keys must be strings not {}'
            raise ValueError(msg.format(key.__class__))

        if not isinstance(val, dict):
            # workaround to include a dict as an attribute
            if isinstance(val, list):
                if isinstance(val[0], dict):
                    val = val[0]

            setattr(thenametuple, key, val)
        else:
            newname = dict2namedtuple(val, key)
            setattr(thenametuple, key, newname)

    return thenametuple


def formatVisParams(visParams):
    """ format visualization parameters to match EE requirements at
    ee.data.getMapId """
    formatted = dict()
    for param, value in visParams.items():
        if isinstance(value, list):
            value = [str(v) for v in value]
        if param in ['bands', 'palette']:
            formatted[param] = ','.join(value) if len(value) == 3 else str(value[0])
        if param in ['min', 'max', 'gain', 'bias', 'gamma']:

            formatted[param] = str(value) if isinstance(value, (int, str)) else ','.join(value)