code: def _write_enums(self, entity_name, attributes):
          
          
          self.enum_attrs_for_locale[entity_name] = attributes;
  
          for attribute in attributes:
              enum_name = "%s%sEnum" % (entity_name, attribute.name[0].upper() + attribute.name[1:])
              self.enum_list.append(enum_name)
              filename = "%s%s.js" % (self._class_prefix, enum_name)
              self.write(destination = self.enum_directory,
                          filename=filename,
                          template_name="enum.js.tpl",
                          class_prefix = self._class_prefix,
                          enum_name = enum_name,
                          allowed_choices = set(attribute.allowed_choices))
docs: This method writes the ouput for a particular specification.