code: def c_str(string):
      """Create ctypes char * from a Python string.
  
      Parameters
      ----------
      string : string type
          Python string.
  
      Returns
      -------
      str : c_char_p
          A char pointer that can be passed to C API.
  
      Examples
      --------
      >>> x = mx.base.c_str("Hello, World")
      >>> print(x.value)
      b"Hello, World"
      """
      return ctypes.c_char_p(string.encode("utf-8"))
  
imports: import re
  import atexit
  import ctypes
  import os
  import sys
  import inspect
  import platform
  import numpy
  from .None import libinfo
label_desc: Use image node_id 10 for calling a global function with example usage: c_str(string) and returns: ctypes