def _get_indentation(line):
 if line.strip():
  non_whitespace_index = (len(line) - len(line.lstrip()))
  return line[:non_whitespace_index]
 else:
  return u''

def _get_indentation ( line ) : if line . strip ( ) : non_whitespace_index = ( len ( line ) - len ( line . lstrip ( ) ) ) return line [ : non_whitespace_index ] else : return u''
return leading whitespace .