Get a CCMOD class from a label string.
166373
def ccmod_class_label_lookup(label):
    """"""

    clsmod = {'ism': admm_ccmod.ConvCnstrMOD_IterSM,
              'cg': admm_ccmod.ConvCnstrMOD_CG,
              'cns': admm_ccmod.ConvCnstrMOD_Consensus,
              'fista': fista_ccmod.ConvCnstrMOD}
    if label in clsmod:
        return clsmod[label]
    else:
        raise ValueError('Unknown ConvCnstrMOD solver method %s' % label)
617902
def classname(ob):
    """"""
    import inspect
    if inspect.isclass(ob):
        return '.'.join([ob.__module__, ob.__name__])
    else:
        return '.'.join([ob.__class__.__module__, ob.__class__.__name__])
835501
def get_style_code(self, label):
        

        for style in self.styles:
            if style[0] == label:
                return style[1]

        msg = _("Label {label} is invalid.").format(label=label)
        raise ValueError(msg)
156984
def getLabelByName(self, name):
        
        name = name.lower()
        if name in self.stimLabels:
            return self.stimLabels[name]
        else:
            return None
107979
def str_to_class(class_name):
    
    mod_str, cls_str = class_name.rsplit('.', 1)
    mod = __import__(mod_str, globals(), locals(), [''])
    cls = getattr(mod, cls_str)
    return cls
200926
def _str_to_type_from_member_module(cls, module_, string):
        

        module_name_short, class_name = string.split(cls._DELIMITER_MODULE)
        members = inspect.getmembers(module_, inspect.ismodule)

        for name, module_member in members:
            if module_name_short == name:
                return getattr(module_member, class_name)

        error_message = cls._ERROR_COULD_NOT_FIND_CLASS.format(string)

        raise exception.BunqException(error_message)
356532
def label( self ):
        
        if ( self._editor and hasattr(self._editor, 'label') ):
            return self._editor.label()
        return ''
698959
def label_set(self):
        """"""
        label_set = list()
        for class_ in self.class_set:
            samples_in_class = self.sample_ids_in_class(class_)
            label_set.append(self.labels[samples_in_class[0]])

        return label_set
16273
def class_from_string(name):
    '''
    
    '''
    module_name, class_name = name.rsplit('.', 1)
    __import__(module_name)
    module = sys.modules[module_name]
    return getattr(module, class_name)
569732
def extract(text, default=UNKNOWN):
        """"""
        if not text:
            return default
        found = CALLING_CONVENTION_TYPES.pattern.match(text)
        if found:
            return found.group('cc')

        return default
15157
def label_from_folder(self, label_cls:Callable=None, **kwargs)->'LabelList':
        ""
        return self.label_from_func(func=lambda o: (o.parts if isinstance(o, Path) else o.split(os.path.sep))[-2],
                                    label_cls=label_cls, **kwargs)
289592
def from_string(cls, s):
        """"""
        for num, text in cls._STATUS_TABLE.items():
            if text == s: return cls(num)
        else:
            #raise ValueError("Wrong string %s" % s)
            logger.warning("Got unknown status: %s" % s)
            return cls.from_string("UNKNOWN")
667558
def classFromString(str)
      # Start with Object, and look up the module one path component at a time
      str.split('::').inject(Object) do |mod, class_name|
        mod.const_get(class_name)
      end
    end
638982
def load_class_by_name(name: str):
    """"""
    mod_path, _, cls_name = name.rpartition('.')
    mod = importlib.import_module(mod_path)
    cls = getattr(mod, cls_name)
    return cls
287530
public static String getLabel(Class<?> clazz, String label) {
		Language language=getThreadLocalLanguage(null);
		
		if (language==null){
			return label;
		} else {
			return getLabel(language, clazz.getName(), label);
		}
	}
30053
def import_class(import_str):
    """"""
    mod_str, _sep, class_str = import_str.rpartition('.')
    try:
        __import__(mod_str)
        return getattr(sys.modules[mod_str], class_str)
    except (ValueError, AttributeError):
        raise ImportError('Class %s cannot be found (%s)' %
                          (class_str,
                           traceback.format_exception(*sys.exc_info())))
277105
def class_string(self, klass):
        ''''''
        if isinstance(klass, string_types):
            return klass
        return klass.__module__ + '.' + klass.__name__