code: def format_info_frags(info_frags):
      
      if isinstance(info_frags, dict):
          return info_frags
      else:
          try:
              scaffolds = parse_info_frags(info_frags)
              return scaffolds
          except OSError:
              print("Error when opening info_frags.txt")
              raise
docs: A function to seamlessly run on either scaffold dictionaries or
      info_frags.txt files without having to check the input first.