code: def code_memory_read(self, addr, num_bytes):
          
          buf_size = num_bytes
          buf = (ctypes.c_uint8 * buf_size)()
          res = self._dll.JLINKARM_ReadCodeMem(addr, buf_size, buf)
          if res < 0:
              raise errors.JLinkException(res)
          return list(buf)[:res]
docs: Reads bytes from code memory.
  
          Note:
            This is similar to calling ``memory_read`` or ``memory_read8``,
            except that this uses a cache and reads ahead.  This should be used
            in instances where you want to read a small amount of bytes at a
            time, and expect to always read ahead.
  
          Args:
            self (JLink): the ``JLink`` instance
            addr (int): starting address from which to read
            num_bytes (int): number of bytes to read
  
          Returns:
            A list of bytes read from the target.
  
          Raises:
            JLinkException: if memory could not be read.