Peculiarities of using `OrderedMap` in a structure

It is recommended to use OrderedMap this way:

import OrderedMap "mo:base/OrderedMap";
...
let natMap = Map.Make<Nat>(Nat.compare); // : Operations<Nat>
stable var keyStorage : Map.Map<Nat, Text> = natMap.empty<Text>();

But what if keyStorage is a member of a structure?

{
  ...
  keyStorage : Map.Map<Nat, Text>;
  ...
}

In this case, do you recommend natMap be a global variable or a member of the same structure?

I think, better global, because it eliminates possible duplicates, but I am not 100% sure.

You will alway need natMap to operate the key value store. So you can A. make natMap a global variable or B. pass the natMap along with the store to ensure it does not go out of scope.