def get_corepy_output(code, inst):
  """Take an instruction, and return a hex string of its encoding, as encoded by CorePy"""
  hex_list = inst.render()

  hex = ""
  for x in hex_list:
    hex += "%02x" % (x)
  return hex