code: def _coord_byval(coord):
      """
      Turns a COORD object into a c_long.
      This will cause it to be passed by value instead of by reference. (That is what I think at least.)
  
      When runing ``ptipython`` is run (only with IPython), we often got the following error::
  
           Error in 'SetConsoleCursorPosition'.
           ArgumentError("argument 2: <class 'TypeError'>: wrong type",)
       argument 2: <class 'TypeError'>: wrong type
  
      It was solved by turning ``COORD`` parameters into a ``c_long`` like this.
  
      More info: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686025(v=vs.85).aspx
      """
      return c_long(coord.Y * 0x10000 | coord.X & 0xFFFF)
  
imports: from __future__ import unicode_literals
  from ctypes import windll, byref, ArgumentError, c_char, c_long, c_ulong, c_uint, pointer
  from ctypes.wintypes import DWORD, HANDLE
  from prompt_toolkit.renderer import Output
  from prompt_toolkit.styles import ANSI_COLOR_NAMES
  from prompt_toolkit.win32_types import CONSOLE_SCREEN_BUFFER_INFO, STD_OUTPUT_HANDLE, STD_INPUT_HANDLE, COORD, SMALL_RECT
  import os
  import six
label_desc: Use image node_id 1 for calling a global function with example usage: _coord_byval(coord) and returns: c_long