code: def generate_private_sharing_and_public_world_readable_precedence():
      """Test that call signature arguments applied through _plot_option_logic
      overwrite options supplied through py.sign_in which overwrite options
      set through tls.set_config
      """
      plot_option_sets = (
          {
              "parent": {"world_readable": True, "auto_open": False},
              "child": {"sharing": "secret", "auto_open": True},
              "expected_output": {
                  "world_readable": False,
                  "sharing": "secret",
                  "auto_open": True,
              },
          },
          {
              "parent": {"world_readable": True, "auto_open": True},
              "child": {"sharing": "private", "auto_open": False},
              "expected_output": {
                  "world_readable": False,
                  "sharing": "private",
                  "auto_open": False,
              },
          },
          {
              "parent": {"world_readable": False, "auto_open": False},
              "child": {"sharing": "public", "auto_open": True},
              "expected_output": {
                  "world_readable": True,
                  "sharing": "public",
                  "auto_open": True,
              },
          },
      )
  
      def gen_test_signin(plot_options):
          def test(self):
              py.sign_in("username", "key", **plot_options["parent"])
              options = py._plot_option_logic(plot_options["child"])
              for option, value in plot_options[
                  "expected_output"
              ].items():
                  self.assertEqual(options[option], value)
  
          return test
  
      def gen_test_config(plot_options):
          def test(self):
              tls.set_config(**plot_options["parent"])
              options = py._plot_option_logic(plot_options["child"])
              for option, value in plot_options[
                  "expected_output"
              ].items():
                  self.assertEqual(options[option], value)
  
      for i, plot_options in enumerate(plot_option_sets):
          setattr(
              TestPlotOptionLogic,
              "test_private_sharing_and_public_"
              "world_readable_precedence_signin{}".format(i),
              gen_test_signin(plot_options),
          )
  
          setattr(
              TestPlotOptionLogic,
              "test_private_sharing_and_public_"
              "world_readable_precedence_config{}".format(i),
              gen_test_config(plot_options),
          )
  
imports: from __future__ import absolute_import
  import urllib
  import requests
  import sys
  import json
  import warnings
  import chart_studio.tools
  import plotly.tools
  from chart_studio import session
  from chart_studio.tests.utils import PlotlyTestCase
  from chart_studio.plotly import plotly
  from _plotly_utils.exceptions import PlotlyError, PlotlyEmptyDataError
  from chart_studio.files import CONFIG_FILE
label_desc: Use image node_id 4 for calling a global function with example usage: generate_private_sharing_and_public_world_readable_precedence() and returns: test