translate string into dict

        :param istr: string with format like: "k1=v1, k2=v2" ...
        :return: dict

def str2dict(istr):
        """ translate string into dict

        :param istr: string with format like: "k1=v1, k2=v2" ...
        :return: dict
        """
        if 'lattice' not in istr.lower():
            tmpstr = istr.replace(',', '=').split('=')
        else:
            tmpstr = istr.split('=')
        k = [i.strip() for i in tmpstr[0::2]]
        v = [i.strip() for i in tmpstr[1::2]]
        return dict(zip(k, v))