parameters: (line)
return_statement: return result
docstring: r"""
      Return the amount of indentation.
      Tabs are expanded to the next multiple of 8.
  
      >>> expand_indent('    ')
      4
      >>> expand_indent('\t')
      8
      >>> expand_indent('    \t')
      8
      >>> expand_indent('       \t')
      8
      >>> expand_indent('        \t')
      16
docstring_summary: r"""
      Return the amount of indentation.
      Tabs are expanded to the next multiple of 8.
docstring_tokens: r Return the amount of indentation . Tabs are expanded to the next multiple of 8 .
function: def expand_indent(line):
      r"""
      Return the amount of indentation.
      Tabs are expanded to the next multiple of 8.
  
      >>> expand_indent('    ')
      4
      >>> expand_indent('\t')
      8
      >>> expand_indent('    \t')
      8
      >>> expand_indent('       \t')
      8
      >>> expand_indent('        \t')
      16
      """
      if '\t' not in line:
          return len(line) - len(line.lstrip())
      result = 0
      for char in line:
          if char == '\t':
              result = result // 8 * 8 + 8
          elif char == ' ':
              result += 1
          else:
              break
      return result
function_tokens: def expand_indent ( line ) : if '\t' not in line : return len ( line ) - len ( line . lstrip ( ) ) result = 0 for char in line : if char == '\t' : result = result // 8 * 8 + 8 elif char == ' ' : result += 1 else : break return result