code: def line(method=EraseMethod.ALL):
          
          methods = ('0', '1', '2')
          if str(method) not in methods:
              raise ValueError('Invalid method, expected {}. Got: {!r}'.format(
                  ', '.join(methods),
                  method,
              ))
          return EscapeCode('{}K'.format(method))
docs: Erase a line, or part of a line. See `method` argument below.
              Cursor position does not change.
  
              Esc[<method>K
  
              Arguments:
                  method : One of these possible values:
                              EraseMethod.END or 0:
                                  Clear from cursor to the end of the line.
                              EraseMethod.START or 1:
                                  Clear from cursor to the start of the line.
                              EraseMethod.ALL or 2:
                                  Clear the entire line.
                           Default: EraseMethod.ALL (2)