<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _stream_vagrant_command(self, args):
 """ Execute a vagrant command, returning a generator of the output lines. Caller should consume the entire generator to avoid the hanging the subprocess. :param args: Arguments for the Vagrant command. :return: generator that yields each line of the command stdout. :rtype: generator iterator """

        py3 = sys.version_info > (3, 0)

        # Make subprocess command
        command = self._make_vagrant_command(args)
        with self.err_cm() as err_fh:
            sp_args = dict(args=command, cwd=self.root, env=self.env,
                           stdout=subprocess.PIPE, stderr=err_fh, bufsize=1)

            # Iterate over output lines.
            # See http://stackoverflow.com/questions/2715847/python-read-streaming-input-from-subprocess-communicate#17698359
            p = subprocess.Popen(**sp_args)
            with p.stdout:
                for line in iter(p.stdout.readline, b''):
                    yield compat.decode(line) # if PY3 decode bytestrings
            p.wait()
            # Raise CalledProcessError for consistency with _call_vagrant_command
            if p.returncode != 0:
                raise subprocess.CalledProcessError(p.returncode, command)