code: def load_from_file(
      file_path: str, mode: str = "word2vec"
  ) -> Embedding:
      """
      Load embedding from `file_path`.
  
      :param file_path: Path to file.
      :param mode: Embedding file format mode, one of 'word2vec' or 'glove'.
          (default: 'word2vec')
      :return: An :class:`matchzoo.embedding.Embedding` instance.
      """
      if mode == "word2vec":
          data = pd.read_csv(
              file_path, sep=" ", index_col=0, header=None, skiprows=1
          )
      elif mode == "glove":
          data = pd.read_csv(
              file_path,
              sep=" ",
              index_col=0,
              header=None,
              quoting=csv.QUOTE_NONE,
          )
      else:
          raise TypeError(
              f"{mode} is not a supported embedding type."
              f"`word2vec` or `glove` expected."
          )
      return Embedding(data)
  
file_path: MatchZoo/matchzoo/embedding/embedding.py
imports: import csv
  import typing
  import numpy
  import pandas
  import matchzoo
label_desc: Use image node_id 1 for calling a global function with example usage: load_from_file(file_path, mode) and returns: Embedding