def METHOD_NAME(elf_dict):
    for category in {'sections', 'segments'}.intersection(elf_dict):
        for entry in elf_dict[category]:
            for key in {'virtual_address', 'offset'}.intersection(entry):
                entry[key] = hex(entry[key])