code: def validate_world_readable_and_sharing_settings(option_set):
      if (
          "world_readable" in option_set
          and option_set["world_readable"] is True
          and "sharing" in option_set
          and option_set["sharing"] is not None
          and option_set["sharing"] != "public"
      ):
          raise PlotlyError(
              "Looks like you are setting your plot privacy to both "
              "public and private.\n If you set world_readable as True, "
              "sharing can only be set to 'public'"
          )
      elif (
          "world_readable" in option_set
          and option_set["world_readable"] is False
          and "sharing" in option_set
          and option_set["sharing"] == "public"
      ):
          raise PlotlyError(
              "Looks like you are setting your plot privacy to both "
              "public and private.\n If you set world_readable as "
              "False, sharing can only be set to 'private' or 'secret'"
          )
      elif "sharing" in option_set and option_set["sharing"] not in [
          "public",
          "private",
          "secret",
          None,
      ]:
          raise PlotlyError(
              "The 'sharing' argument only accepts one of the following "
              "strings:\n'public' -- for public plots\n"
              "'private' -- for private plots\n"
              "'secret' -- for private plots that can be shared with a "
              "secret url"
          )
  
file_path: plotly.py/packages/python/chart-studio/chart_studio/utils.py
imports: from __future__ import absolute_import
  import os.path
  import re
  import threading
  import warnings
  import json
  from _plotly_utils.exceptions import PlotlyError
  from _plotly_utils.optional_imports import get_module
label_desc: Use image node_id 7 for calling a global function with example usage: validate_world_readable_and_sharing_settings(option_set) without return types