code: def from_file(cls, fname, form=None):
          
          try:
              tg = TableGroup.from_file(fname)
              opfname = None
          except JSONDecodeError:
              tg = TableGroup.fromvalue(cls.MD)
              opfname = fname
          if len(tg.tables) != 1:
              raise ValueError('profile description must contain exactly one table')
          metadata = tg.common_props
          metadata.update(fname=Path(fname), form=form)
          return cls(
              *[{k: None if (k != cls.GRAPHEME_COL and v == cls.NULL) else v for k, v in d.items()}
                for d in tg.tables[0].iterdicts(fname=opfname)],
              **metadata)
docs: Read an orthography profile from a metadata file or a default tab-separated profile file.