code: def _set_default_visibility() -> None:
      """Overwrites the default visibility for the TFDS scripts.
  
      If the script executed is a TFDS script, then it restricts the visibility
      to only open-source non-community datasets.
      """
      import __main__  # pytype: disable=import-error  # pylint: disable=g-import-not-at-top
  
      main_file = getattr(__main__, "__file__", None)
      if (
          main_file
          and "tensorflow_datasets" in pathlib.Path(main_file).parts
      ):
          # If the script is launched from within a TFDS script, we disable community
          # datasets and restrict scripts to only public datasets.
          # Accessing community datasets should be explicitly requested.
          set_availables(
              [
                  DatasetType.TFDS_PUBLIC,
              ]
          )
  
file_path: datasets/tensorflow_datasets/core/visibility.py
imports: import contextlib
  import enum
  import pathlib
  from typing import Iterable, Iterator, List
  from absl import app
label_desc: Use image node_id 4 for calling a global function with example usage: _set_default_visibility() without return types