parameters: (self, input)
return_statement: return max_len
docstring: :type input: str
          :rtype: int
docstring_summary: :type input: str
          :rtype: int
docstring_tokens: : type input : str : rtype : int
function: def lengthLongestPath(self, input):
          """
          :type input: str
          :rtype: int
          """
          def split_iter(s, tok):
              start = 0
              for i in xrange(len(s)):
                  if s[i] == tok:
                      yield s[start:i]
                      start = i + 1
              yield s[start:]
  
  
          max_len = 0
          path_len = {0: 0}
          for line in split_iter(input, '\n'):
              name = line.lstrip('\t')
              depth = len(line) - len(name)
              if '.' in name:
                  max_len = max(max_len, path_len[depth] + len(name))
              else:
                  path_len[depth + 1] = path_len[depth] + len(name) + 1
          return max_len
function_tokens: def lengthLongestPath ( self , input ) : def split_iter ( s , tok ) : start = 0 for i in xrange ( len ( s ) ) : if s [ i ] == tok : yield s [ start : i ] start = i + 1 yield s [ start : ] max_len = 0 path_len = { 0 : 0 } for line in split_iter ( input , '\n' ) : name = line . lstrip ( '\t' ) depth = len ( line ) - len ( name ) if '.' in name : max_len = max ( max_len , path_len [ depth ] + len ( name ) ) else : path_len [ depth + 1 ] = path_len [ depth ] + len ( name ) + 1 return max_len