:type s: str
    :type t: str
    :rtype: bool
547915
def is_anagram(s, t):
    
    maps = {}
    mapt = {}
    for i in s:
        maps[i] = maps.get(i, 0) + 1
    for i in t:
        mapt[i] = mapt.get(i, 0) + 1
    return maps == mapt
1002826
public static boolean isSameType(Type s, Type t, VisitorState state) {
    if (s == null || t == null) {
      return false;
    }
    Types types = state.getTypes();
    return types.isSameType(types.erasure(s), types.erasure(t));
  }
789696
def IsHFS(self):
    
    tsk_fs_type = self.GetFsType()
    return tsk_fs_type in [
        pytsk3.TSK_FS_TYPE_HFS, pytsk3.TSK_FS_TYPE_HFS_DETECT]
498597
def p_types(self, p):
        ''''''
        if len(p) == 2:
            p[0] = tuple((t,) for t in p[1])
        else:
            p[0] = tuple((t,) + ts for t in p[1] for ts in p[3])
1038988
def _str_to_bool(str_):
    """"""
    if str_.lower() not in ['true', 'false', 'none']:
        raise ValueError('Need bool; got %r' % str_)
    return {'true': True, 'false': False, 'none': None}[str_.lower()]
1099180
def bool(self):
        
        shape = self.shape
        if shape != (1,) and shape != (1, 1):
            raise ValueError(
                """The PandasObject does not have exactly
                                1 element. Return the bool of a single
                                element PandasObject. The truth value is
                                ambiguous. Use a.empty, a.item(), a.any()
                                or a.all()."""
            )
        else:
            return self._to_pandas().bool()
185956
def check_type(lineno, type_list, arg):
    
    if not isinstance(type_list, list):
        type_list = [type_list]

    if arg.type_ in type_list:
        return True

    if len(type_list) == 1:
        syntax_error(lineno, "Wrong expression type '%s'. Expected '%s'" %
                     (arg.type_, type_list[0]))
    else:
        syntax_error(lineno, "Wrong expression type '%s'. Expected one of '%s'"
                     % (arg.type_, tuple(type_list)))

    return False
812876
def _check_and_convert_bools(self):
        
        replacements = {
            True: 'T',
            False: 'F',
        }

        for key in self.bools:
            if isinstance(self[key], bool):
                self[key] = replacements[self[key]]
84591
def auto_type(s):
    
    if isinstance(s, bool):
        return s
    elif s is None:
        return ''
    elif s == 'TRUE':
        return True
    elif s == 'FALSE':
        return False
    else:
        try:
            try:
                # telephone numbers may be wrongly interpretted as ints
                if s.startswith('+'):
                    return s
                else:
                    return int(s)
            except ValueError:
                return float(s)

        except ValueError:
            return s
966463
def write(self, s, flush=True):
        
        return self._writeb(s, flush=flush)
740955
def _get_type(self, s):
        
        # TODO: what if the number is bigger than an int or float?
        if s.startswith('"') and s.endswith('"'):
            return s[1:-1]
        elif s.find('.') != -1: 
            return float(s) 
        else: 
            return int(s)
966156
def get_truetype(value):
    """"""
    if value in ["true", "True", "y", "Y", "yes"]:
        return True
    if value in ["false", "False", "n", "N", "no"]:
        return False
    if value.isdigit():
        return int(value)
    return str(value)
1184102
def ensure_true(bool_func: Callable[[Any], bool],
                message=None) -> Filter_T:
    

    def validate(value):
        if bool_func(value) is not True:
            _raise_failure(message)
        return value

    return validate
966142
public boolean isSuperType(Type t, Type s) {
        switch (t.getTag()) {
        case ERROR:
            return true;
        case UNDETVAR: {
            UndetVar undet = (UndetVar)t;
            if (t == s ||
                undet.qtype == s ||
                s.hasTag(ERROR) ||
                s.hasTag(BOT)) {
                return true;
            }
            undet.addBound(InferenceBound.LOWER, s, this);
            return true;
        }
        default:
            return isSubtype(s, t);
        }
    }
466727
def booleanize(truthy):
    '''
    
    '''
    if truthy is None:
        return False
    elif isinstance(truthy, basestring):
        if truthy:
            try:
                return bool(distutils.util.strtobool(truthy))
            except ValueError:
                return True
        else:
            return False
    elif is_collection(truthy):
        return not is_empty(truthy)
    else:
        return bool(truthy)
324905
def getBool(t):
    
    b = c_int()
    if PL_get_long(t, byref(b)):
        return bool(b.value)
    else:
        raise InvalidTypeError("bool")
743093
def return_type(self):
        
        returns = self.returns
        if returns:
            return [r.type for r in returns]
        return None