parameters: (self, threat_types, analyst, append=True)
docstring: Add threat types to this Indicator.
  
          :param threat_types: The threat types to be added.
          :type threat_types: list, str
          :param analyst: The analyst adding these threat types.
          :type analyst: str
          :param append: Whether or not to replace or append these threat types.
          :type append: boolean
docstring_summary: Add threat types to this Indicator.
docstring_tokens: Add threat types to this Indicator .
function: def add_threat_type_list(self, threat_types, analyst, append=True):
          """
          Add threat types to this Indicator.
  
          :param threat_types: The threat types to be added.
          :type threat_types: list, str
          :param analyst: The analyst adding these threat types.
          :type analyst: str
          :param append: Whether or not to replace or append these threat types.
          :type append: boolean
          """
  
          if (isinstance(threat_types, list) and
              len(threat_types) == 1 and
              threat_types[0] == ''):
              parsed_threat_types = []
          elif isinstance(threat_types, (str, unicode)):
              parsed_threat_types = threat_types.split(',')
          else:
              parsed_threat_types = threat_types
  
          parsed_threat_types = [s.strip() for s in parsed_threat_types]
  
          unknown = IndicatorThreatTypes.UNKNOWN
          if len(self.threat_types) and unknown in parsed_threat_types and append:
              parsed_threat_types.remove(unknown)
          if unknown in self.threat_types:
              self.threat_types.remove(unknown)
  
          if append:
              for t in parsed_threat_types:
                  if t not in self.sectors:
                      self.threat_types.append(t)
          elif len(parsed_threat_types):
              self.threat_types = parsed_threat_types
  
          if len(self.threat_types) == 0:
              self.threat_types = [unknown]
function_tokens: def add_threat_type_list ( self , threat_types , analyst , append = True ) : if ( isinstance ( threat_types , list ) and len ( threat_types ) == 1 and threat_types [ 0 ] == '' ) : parsed_threat_types = [ ] elif isinstance ( threat_types , ( str , unicode ) ) : parsed_threat_types = threat_types . split ( ',' ) else : parsed_threat_types = threat_types parsed_threat_types = [ s . strip ( ) for s in parsed_threat_types ] unknown = IndicatorThreatTypes . UNKNOWN if len ( self . threat_types ) and unknown in parsed_threat_types and append : parsed_threat_types . remove ( unknown ) if unknown in self . threat_types : self . threat_types . remove ( unknown ) if append : for t in parsed_threat_types : if t not in self . sectors : self . threat_types . append ( t ) elif len ( parsed_threat_types ) : self . threat_types = parsed_threat_types if len ( self . threat_types ) == 0 : self . threat_types = [ unknown ]