def struct_type_from_fields(self, 
                                 field_types, 
                                 struct_name = "tuple_type", 
                                 field_names = None, 
                                 field_repeats = {}):
    
    if any(not isinstance(t, str) for t in field_types):
      field_types = tuple(self.to_ctype(t) if isinstance(t, Type) else t 
                          for t in field_types)
    else:
      field_types = tuple(field_types)
    
    if field_names is None:
      field_names = tuple("elt%d" % i for i in xrange(len(field_types)))
    else:
      assert len(field_names) == len(field_types), \
        "Mismatching number of types %d and field names %d" % (len(field_types), len(field_names))
      field_names = tuple(field_names)
    
    repeat_set =  frozenset(sorted(field_repeats.items()))
    key = field_types, struct_name, field_names, repeat_set
     
    if _struct_type_names in key:
      typename = _struct_type_names[key]
      decl = _struct_type_decls[typename]
      if decl not in self.declarations:
        self.declarations.append(decl)
      return typename 
    
    typename = names.fresh(struct_name).replace(".", "")
    
    field_decls = []
    for t, field_name in zip(field_types, field_names):
      if field_name in field_repeats:
        field_decl = "  %s %s[%d];" % (t, field_name, field_repeats[field_name])
      else:
        field_decl = "  %s %s;" % (t, field_name)
      field_decls.append(field_decl)
    decl = "typedef struct %s {\n%s\n} %s;" % (typename, "\n".join(field_decls), typename)
    
    _struct_type_names[key] = typename
    _struct_type_decls[typename] = decl
    self.add_decl(decl)
    return typename
dataset/ETHPy150Open iskandr/parakeet/parakeet/c_backend/fn_compiler.py/FnCompiler.struct_type_from_fields/swapped operands of `in`