code: def from_file(cls, filepath):
          
          # Find the abinit extension.
          for i in range(len(filepath)):
              if filepath[i:] in abi_extensions():
                  ext = filepath[i:]
                  break
          else:
              raise ValueError("Cannot detect abinit extension in %s" % filepath)
  
          return cls(ext, filepath)
docs: Build a :class:`Product` instance from a filepath.