prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Do not overwrite global `bytes` in code or examples
  It looks like there's a few places we overwrite `bytes` (the type identifier) with a local variable.
  
  ```
  $ git grep -E -e '^ +bytes *=' -- '*.py'
  pwnlib/commandline/disasm.py:81:        bytes   = disasm(dat, vma=safeeval.const(args.address), instructions=False, offset=False)
  pwnlib/commandline/elfpatch.py:29:    bytes  = unhex(a.bytes)
  pwnlib/elf/elf.py:195:    bytes = 4
  ```
  
  And a few cases we do it in tests, which could have cross-test impact if the global state isn't reset (hint: it isn't).
  
  ```
  ~/pwntools $ git grep -E -e '^ +>>> bytes *=' -- '*.py'
  pwnlib/runner.py:42:        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  pwnlib/runner.py:48:        >>> bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')
  pwnlib/runner.py:87:        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  ```
  
  </issue>
  <code>
  [start of pwnlib/runner.py]
  1 from __future__ import absolute_import
  2 from __future__ import division
  3 
  4 import os
  5 import tempfile
  6 
  7 from pwnlib.context import LocalContext
  8 from pwnlib.elf import ELF
  9 from pwnlib.tubes.process import process
  10 
  11 __all__ = ['run_assembly', 'run_shellcode', 'run_assembly_exitcode', 'run_shellcode_exitcode']
  12 
  13 @LocalContext
  14 def run_assembly(assembly):
  15     """
  16     Given an assembly listing, assemble and execute it.
  17 
  18     Returns:
  19 
  20         A :class:`pwnlib.tubes.process.process` tube to interact with the process.
  21 
  22     Example:
  23 
  24         >>> p = run_assembly('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  25         >>> p.wait_for_close()
  26         >>> p.poll()
  27         3
  28 
  29         >>> p = run_assembly('mov r0, #12; mov r7, #1; svc #0', arch='arm')
  30         >>> p.wait_for_close()
  31         >>> p.poll()
  32         12
  33     """
  34     return ELF.from_assembly(assembly).process()
  35 
  36 @LocalContext
  37 def run_shellcode(bytes, **kw):
  38     """Given assembled machine code bytes, execute them.
  39 
  40     Example:
  41 
  42         >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  43         >>> p = run_shellcode(bytes)
  44         >>> p.wait_for_close()
  45         >>> p.poll()
  46         3
  47 
  48         >>> bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')
  49         >>> p = run_shellcode(bytes, arch='arm')
  50         >>> p.wait_for_close()
  51         >>> p.poll()
  52         12
  53     """
  54     return ELF.from_bytes(bytes, **kw).process()
  55 
  56 @LocalContext
  57 def run_assembly_exitcode(assembly):
  58     """
  59     Given an assembly listing, assemble and execute it, and wait for
  60     the process to die.
  61 
  62     Returns:
  63 
  64         The exit code of the process.
  65 
  66     Example:
  67 
  68         >>> run_assembly_exitcode('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  69         3
  70     """
  71     p = run_assembly(assembly)
  72     p.wait_for_close()
  73     return p.poll()
  74 
  75 @LocalContext
  76 def run_shellcode_exitcode(bytes):
  77     """
  78     Given assembled machine code bytes, execute them, and wait for
  79     the process to die.
  80 
  81     Returns:
  82 
  83         The exit code of the process.
  84 
  85     Example:
  86 
  87         >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  88         >>> run_shellcode_exitcode(bytes)
  89         3
  90     """
  91     p = run_shellcode(bytes)
  92     p.wait_for_close()
  93     return p.poll()
  94
  [end of pwnlib/runner.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/pwnlib/runner.py b/pwnlib/runner.py
  --- a/pwnlib/runner.py
  +++ b/pwnlib/runner.py
  @@ -39,14 +39,14 @@
   
       Example:
   
  -        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  -        >>> p = run_shellcode(bytes)
  +        >>> insn_bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  +        >>> p = run_shellcode(insn_bytes)
           >>> p.wait_for_close()
           >>> p.poll()
           3
   
  -        >>> bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')
  -        >>> p = run_shellcode(bytes, arch='arm')
  +        >>> insn_bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')
  +        >>> p = run_shellcode(insn_bytes, arch='arm')
           >>> p.wait_for_close()
           >>> p.poll()
           12
  @@ -84,8 +84,8 @@
   
       Example:
   
  -        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  -        >>> run_shellcode_exitcode(bytes)
  +        >>> insn_bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
  +        >>> run_shellcode_exitcode(insn_bytes)
           3
       """
       p = run_shellcode(bytes)
  
verification_info: {"golden_diff": "diff --git a/pwnlib/runner.py b/pwnlib/runner.py\n--- a/pwnlib/runner.py\n+++ b/pwnlib/runner.py\n@@ -39,14 +39,14 @@\n \n     Example:\n \n-        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\n-        >>> p = run_shellcode(bytes)\n+        >>> insn_bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\n+        >>> p = run_shellcode(insn_bytes)\n         >>> p.wait_for_close()\n         >>> p.poll()\n         3\n \n-        >>> bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')\n-        >>> p = run_shellcode(bytes, arch='arm')\n+        >>> insn_bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')\n+        >>> p = run_shellcode(insn_bytes, arch='arm')\n         >>> p.wait_for_close()\n         >>> p.poll()\n         12\n@@ -84,8 +84,8 @@\n \n     Example:\n \n-        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\n-        >>> run_shellcode_exitcode(bytes)\n+        >>> insn_bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\n+        >>> run_shellcode_exitcode(insn_bytes)\n         3\n     \"\"\"\n     p = run_shellcode(bytes)\n", "issue": "Do not overwrite global `bytes` in code or examples\nIt looks like there's a few places we overwrite `bytes` (the type identifier) with a local variable.\r\n\r\n```\r\n$ git grep -E -e '^ +bytes *=' -- '*.py'\r\npwnlib/commandline/disasm.py:81:        bytes   = disasm(dat, vma=safeeval.const(args.address), instructions=False, offset=False)\r\npwnlib/commandline/elfpatch.py:29:    bytes  = unhex(a.bytes)\r\npwnlib/elf/elf.py:195:    bytes = 4\r\n```\r\n\r\nAnd a few cases we do it in tests, which could have cross-test impact if the global state isn't reset (hint: it isn't).\r\n\r\n```\r\n~/pwntools $ git grep -E -e '^ +>>> bytes *=' -- '*.py'\r\npwnlib/runner.py:42:        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\r\npwnlib/runner.py:48:        >>> bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')\r\npwnlib/runner.py:87:        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\r\n```\n", "before_files": [{"content": "from __future__ import absolute_import\nfrom __future__ import division\n\nimport os\nimport tempfile\n\nfrom pwnlib.context import LocalContext\nfrom pwnlib.elf import ELF\nfrom pwnlib.tubes.process import process\n\n__all__ = ['run_assembly', 'run_shellcode', 'run_assembly_exitcode', 'run_shellcode_exitcode']\n\n@LocalContext\ndef run_assembly(assembly):\n    \"\"\"\n    Given an assembly listing, assemble and execute it.\n\n    Returns:\n\n        A :class:`pwnlib.tubes.process.process` tube to interact with the process.\n\n    Example:\n\n        >>> p = run_assembly('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\n        >>> p.wait_for_close()\n        >>> p.poll()\n        3\n\n        >>> p = run_assembly('mov r0, #12; mov r7, #1; svc #0', arch='arm')\n        >>> p.wait_for_close()\n        >>> p.poll()\n        12\n    \"\"\"\n    return ELF.from_assembly(assembly).process()\n\n@LocalContext\ndef run_shellcode(bytes, **kw):\n    \"\"\"Given assembled machine code bytes, execute them.\n\n    Example:\n\n        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\n        >>> p = run_shellcode(bytes)\n        >>> p.wait_for_close()\n        >>> p.poll()\n        3\n\n        >>> bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')\n        >>> p = run_shellcode(bytes, arch='arm')\n        >>> p.wait_for_close()\n        >>> p.poll()\n        12\n    \"\"\"\n    return ELF.from_bytes(bytes, **kw).process()\n\n@LocalContext\ndef run_assembly_exitcode(assembly):\n    \"\"\"\n    Given an assembly listing, assemble and execute it, and wait for\n    the process to die.\n\n    Returns:\n\n        The exit code of the process.\n\n    Example:\n\n        >>> run_assembly_exitcode('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\n        3\n    \"\"\"\n    p = run_assembly(assembly)\n    p.wait_for_close()\n    return p.poll()\n\n@LocalContext\ndef run_shellcode_exitcode(bytes):\n    \"\"\"\n    Given assembled machine code bytes, execute them, and wait for\n    the process to die.\n\n    Returns:\n\n        The exit code of the process.\n\n    Example:\n\n        >>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')\n        >>> run_shellcode_exitcode(bytes)\n        3\n    \"\"\"\n    p = run_shellcode(bytes)\n    p.wait_for_close()\n    return p.poll()\n", "path": "pwnlib/runner.py"}]}