parameters: (self, patterns)
return_statement: return patterns
docstring: Append suffix to patterns in dictionary if
          we are in a conditional FP tree.
docstring_summary: Append suffix to patterns in dictionary if
          we are in a conditional FP tree.
docstring_tokens: Append suffix to patterns in dictionary if we are in a conditional FP tree .
function: def _zip_patterns(self, patterns):
          """
          Append suffix to patterns in dictionary if
          we are in a conditional FP tree.
          """
          suffix = self.root.value
  
          if suffix is not None:
              # We are in a conditional tree.
              new_patterns = {}
              for key in patterns.keys():
                  new_patterns[tuple(sorted(list(key) + [suffix]))] = patterns[key]
  
              new_patterns[tuple([self.root.value])] = self.root.count
                  
              return new_patterns
  
          return patterns
function_tokens: def _zip_patterns ( self , patterns ) : suffix = self . root . value if suffix is not None : # We are in a conditional tree. new_patterns = { } for key in patterns . keys ( ) : new_patterns [ tuple ( sorted ( list ( key ) + [ suffix ] ) ) ] = patterns [ key ] new_patterns [ tuple ( [ self . root . value ] ) ] = self . root . count return new_patterns return patterns