code: def create_or_update_policy(self, name, policy, pretty_print=True):
          
          if isinstance(policy, dict):
              if pretty_print:
                  policy = json.dumps(policy, indent=4, sort_keys=True)
              else:
                  policy = json.dumps(policy)
          params = {
              'policy': policy,
          }
          api_path = '/v1/sys/policy/{name}'.format(name=name)
          return self._adapter.put(
              url=api_path,
              json=params,
          )
docs: Add a new or update an existing policy.
  
          Once a policy is updated, it takes effect immediately to all associated users.
  
          Supported methods:
              PUT: /sys/policy/{name}. Produces: 204 (empty body)
  
          :param name: Specifies the name of the policy to create.
          :type name: str | unicode
          :param policy: Specifies the policy document.
          :type policy: str | unicode | dict
          :param pretty_print: If True, and provided a dict for the policy argument, send the policy JSON to Vault with
              "pretty" formatting.
          :type pretty_print: bool
          :return: The response of the request.
          :rtype: requests.Response