def CanonicalFormFromMask(self, mask):
tree = _FieldMaskTree(mask)<EOL>tree.ToFieldMask(self)<EOL>
Converts a FieldMask to the canonical form.

        Removes paths that are covered by another path. For example,
        "foo.bar" is covered by "foo" and will be removed if "foo"
        is also in the FieldMask. Then sorts all paths in alphabetical order.

        Args:
          mask: The original FieldMask to be converted.