code: def args_fixup(args):
      
      # cache key_handle_to_int of all key handles, turning args.key_handles into
      # a list of tuples with both original value and integer
      res = []
      for kh in args.key_handles:
          kh_int = pyhsm.util.key_handle_to_int(kh)
          res.append((kh, kh_int,))
      args.key_handles = res
  
      # Check if the DB url should be read from an environment variable
      if args.db_url and args.db_url.startswith('env:'):
          env_var = args.db_url[4:]
          if env_var in os.environ:
              args.db_url = os.environ[env_var]
docs: Additional checks/cleanups of parsed arguments.