code: def _build_errors_df(name_errors, label):
      """Helper to build errors DataFrame."""
      series = []
      percentiles = np.linspace(0, 100, 21)
      index = percentiles / 100
      for name, errors in name_errors:
          series.append(
              pd.Series(
                  np.nanpercentile(errors, q=percentiles),
                  index=index,
                  name=name,
              )
          )
      df = pd.concat(series, axis=1)
      df.columns.name = "derivative"
      df.index.name = "quantile"
      df = df.stack().rename("error").reset_index()
      with np.errstate(divide="ignore"):
          df["log(error)"] = np.log(df["error"])
      if label is not None:
          df["label"] = label
      return df
  
file_path: tf-quant-finance/tf_quant_finance/experimental/finite_difference/methods.py
imports: from autograd import elementwise_grad
  import autograd.numpy
  import pandas
  import sobol_seq
label_desc: Use image node_id 12 for calling a global function with example usage: _build_errors_df(name_errors, label) and returns: df