code: def _read_file(fname, fmt_name, fmt_delimiter):
      """Read a file
  
      Parameters:
      -----------
      fname : string
          filename of the input file to read
      fmt_name : string
          specifying whether it is a csv or a parquet file
      fmt_delimiter : string
          string specifying the delimiter used in the input file
      """
      reader_fmt_meta = {
          "name": fmt_name,
      }
      if fmt_name == constants.STR_CSV:
          reader_fmt_meta["delimiter"] = fmt_delimiter
      data_df = array_readwriter.get_array_parser(
          **reader_fmt_meta
      ).read(fname)
      return data_df
  
file_path: dgl/tests/tools/test_parmetis_preproc.py
imports: import os
  import tempfile
  from collections import namedtuple
  import numpy
  import pytest
  from distpartitioning import array_readwriter, constants
  from distpartitioning.parmetis_preprocess import gen_edge_files
  from distpartitioning.utils import generate_roundrobin_read_list
  from numpy.testing import assert_array_equal
label_desc: Use image node_id 1 for calling a global function with example usage: _read_file(fname, fmt_name, fmt_delimiter) and returns: data_df