def dict_key(dict, arg):
    """Returns the given key from a dictionary, with optional default value."""
    arg = arg.split(',')
    key, default = arg[:2] if len(arg) == 2 else (arg[0], None)
    return dict.get(key, default)