code: def has_selfloop(dataset):
      if not dataset.metadata["is_directed"]:
          return False
      df = dataset.get_edgelist(download=True)
      df.rename(
          columns={df.columns[0]: "src", df.columns[1]: "dst"},
          inplace=True,
      )
      res = df.where(df["src"] == df["dst"])
  
      return res.notnull().values.any()
  
imports: import os
  import gc
  from pathlib import Path
  from tempfile import TemporaryDirectory
  import pandas
  import pytest
  import cudf
  import dask_cudf
  from cugraph.structure import Graph
  from cugraph.testing import RAPIDS_DATASET_ROOT_DIR_PATH, ALL_DATASETS, WEIGHTED_DATASETS, SMALL_DATASETS, BENCHMARKING_DATASETS
  from cugraph import datasets
  from cugraph.dask.common.mg_utils import is_single_gpu
label_desc: Use image node_id 3 for calling a global function with example usage: has_selfloop(dataset) and returns: res, False