docstr: Set sharing settings. Any settings not passed here will cascade from PyGraphistry or defaults
docstr_tok: ["Set","sharing","settings",".","Any","settings","not","passed","here","will","cascade","from","PyGraphistry","or","defaults"]
code: def post_share_link(
      self,
      obj_pk: str,
      obj_type: str = "dataset",
      privacy: Optional[Privacy] = None,
  ):
      """
      Set sharing settings. Any settings not passed here will cascade from PyGraphistry or defaults
      """
  
      (
          mode,
          notify,
          invited_users,
          mode_action,
          message,
      ) = self.cascade_privacy_settings(**(privacy or {}))
  
      path = self.server_base_path + "/api/v2/share/link/"
      tok = self.token
      res = requests.post(
          path,
          verify=self.certificate_validation,
          headers={"Authorization": f"Bearer {tok}"},
          json={
              "obj_pk": obj_pk,
              "obj_type": obj_type,
              "mode": mode,
              "notify": notify,
              "invited_users": invited_users,
              "mode_action": mode_action,
              "message": message,
          },
      )
  
      if res.status_code != requests.codes.ok:
          logger.error(
              "Failed setting sharing status (code %s): %s",
              res.status_code,
              res.text,
              exc_info=True,
          )
  
      if res.status_code == 404:
          raise Exception(
              f"Code not find resource {path}; is your server location correct and does it support sharing?"
          )
  
      if res.status_code == 403:
          raise Exception(
              f"Permission denied ({path}); do you have edit access and does your account having sharing enabled?"
          )
  
      try:
          out = res.json()
          logger.debug("Server create file response: %s", out)
          if res.status_code != requests.codes.ok:
              res.raise_for_status()
      except Exception as e:
          logger.error(
              "Unexpected error setting sharing settings: %s",
              res.text,
              exc_info=True,
          )
          raise e
  
      logger.debug(
          "Set privacy: mode %s, notify %s, users %s, mode_action %s, message: %s",
          mode,
          notify,
          invited_users,
          mode_action,
          message,
      )
  
      return out
  
imports: from typing import List, Optional
  import io, pyarrow, requests, sys
  from graphistry.privacy import Mode, Privacy
  from .ArrowFileUploader import ArrowFileUploader
  from .util import setup_logger
label_desc: Use image node_id 44 for calling the ArrowUploader obj's underlying member method code with example usage: obj.post_share_link(obj_pk, obj_type, privacy) and returns: out