def assemble_hex(asmcode, pc=<NUM_LIT:0>, fork=DEFAULT_FORK):
if isinstance(asmcode, list):<EOL><INDENT>return '<STR_LIT>' + hexlify(b'<STR_LIT>'.join([x.bytes for x in asmcode])).decode('<STR_LIT:ascii>')<EOL><DEDENT>return '<STR_LIT>' + hexlify(assemble(asmcode, pc=pc, fork=fork)).decode('<STR_LIT:ascii>')<EOL>
Assemble an EVM program

        :param asmcode: an evm assembler program
        :type asmcode: str | iterator[Instruction]
        :param pc: program counter of the first instruction(optional)
        :type pc: int
        :param fork: fork name (optional)
        :type fork: str
        :return: the hex representation of the bytecode
        :rtype: str

        Example use::

            >>> assemble_hex('''PUSH1 0x60\n \
                                       BLOCKHASH\n \
                                       MSTORE\n \
                                       PUSH1 0x2\n \
                                       PUSH2 0x100\n \
                                    ''')
            ...
            "0x6060604052600261010"