code: def merged_args_dicts(global_args, subcommand_args):
      '''We deal with docopt args from the toplevel peru parse and the subcommand
      parse. We don't want False values for a flag in the subcommand to override
      True values if that flag was given at the top level. This function
      specifically handles that case.'''
      merged = global_args.copy()
      for key, val in subcommand_args.items():
          if key not in merged:
              merged[key] = val
          elif type(merged[key]) is type(val) is bool:
              merged[key] = merged[key] or val
          else:
              raise RuntimeError("Unmergable args.")
      return mergef merged_args_dicts(global_args, subcommand_args):
      '''We deal with docopt args from the toplevel peru parse and the subcommand
      parse. We don't want False values for a flag in the subcommand to override
      True values if that flag was given at the top level. This function
      specifically handles that case.'''
      merged = global_args.copy()
      for key, val in subcommand_args.items():
          if key not in merged:
              merged[key] = val
          elif type(merged[key]) is type(val) is bool:
              merged[key] = merged[key] or val
          else:
              raise RuntimeError("Unmergable args.")
      return merged
docs: We deal with docopt args from the toplevel peru parse and the subcommand
      parse. We don't want False values for a flag in the subcommand to override
      True values if that flag was given at the top level. This function
      specifically handles that case.