code: def datasets_dir():
      try:
          import yatest.common as yc
      except ImportError:
          return dirname(__file__)
      else:
          return yc.source_path(
              "contrib/python/scikit-learn/py2/sklearn/datasets"
          )
  
imports: import os
  import csv
  import sys
  import shutil
  from os import environ
  from os.path import dirname
  from os.path import join
  from os.path import exists
  from os.path import expanduser
  from os.path import isdir
  from os.path import splitext
  from os import listdir
  from os import makedirs
  import numpy
  from ..utils import check_random_state
label_desc: Use image node_id 1 for calling a global function with example usage: datasets_dir() and returns: yc, dirname