def make_machine_mapping(machine_list):
if machine_list is None:<EOL><INDENT>return {}<EOL><DEDENT>else:<EOL><INDENT>mapping = {}<EOL>for pair in machine_list:<EOL><INDENT>if (constants.MACHINE_SEPARATOR not in pair) or (pair.count(constants.MACHINE_SEPARATOR) != <NUM_LIT:1>):<EOL><INDENT>raise ValueError("<STR_LIT>", constants.MACHINE_SEPARATOR)<EOL><DEDENT>(logical, physical) = pair.split(constants.MACHINE_SEPARATOR)<EOL>mapping[logical] = physical<EOL><DEDENT>return mapping<EOL><DEDENT>
Convert the machine list argument from a list of names into a mapping of logical names to
physical hosts. This is similar to the _parse_configs function but separated to provide the
opportunity for extension and additional checking of machine access