Rename functions in keys.py and update test_keys.py

create_in_metadata_format --> format_keyval_to_metadata
create_from_metadata_format --> format_metadata_to_key