class_docstr: Import CLTK corpora.
class_docstr_tok: ["Import","CLTK","corpora","."]
docstr: Check CLTK_DATA_DIR + '/distributed_corpora.yaml' for any custom,
  distributed corpora that the user wants to load locally.
docstr_tok: ["Check","CLTK_DATA_DIR","+","'\/distributed_corpora.yaml","'","for","any","custom",",","distributed","corpora","that","the","user","wants","to","load","locally","."]
code: def _get_user_defined_corpora(self):
      """Check CLTK_DATA_DIR + '/distributed_corpora.yaml' for any custom,
      distributed corpora that the user wants to load locally.
      """
      if self.testing:
          distributed_corpora_fp = os.path.normpath(
              os.path.join(
                  CLTK_DATA_DIR, "test_distributed_corpora.yaml"
              )
          )
      else:
          distributed_corpora_fp = os.path.normpath(
              os.path.join(CLTK_DATA_DIR, "distributed_corpora.yaml")
          )
      try:
          with open(distributed_corpora_fp) as file_open:
              corpora_dict = yaml.safe_load(file_open)
      except FileNotFoundError:
          logger.debug(
              "``~/cltk_data/distributed_corpora.yaml`` file not found."
          )
          return []
      except yaml.parser.ParserError as parse_err:
          logger.debug("Yaml parsing error: %s" % parse_err)
          return []
      user_defined_corpora = []
      for corpus_name in corpora_dict:
          about = corpora_dict[corpus_name]
  
          if about["language"].lower() == self.language:
              user_defined_corpus = dict()
              user_defined_corpus["origin"] = about["origin"]
              user_defined_corpus["type"] = about["type"]
              user_defined_corpus["name"] = corpus_name
              user_defined_corpus["user_defined"] = True
              user_defined_corpora.append(user_defined_corpus)
  
      return user_defined_corpora
  
imports: import errno
  import os
  import shutil
  import sys
  from urllib.parse import urljoin
  import yaml
  from git import RemoteProgress, Repo
  from cltk.core.cltk_logger import logger
  from cltk.core.exceptions import CorpusImportError
  from cltk.languages.utils import get_lang
  from cltk.utils.utils import CLTK_DATA_DIR
label_desc: Use image node_id 3 for calling the FetchCorpus obj's underlying member method code with example usage: obj._get_user_defined_corpora() and returns: user_defined_corpora, list, list