code: def create_retention_policy(self, name, duration, replication,
                                  database=None,
                                  default=False, shard_duration="0s"):
          
          query_string = \
              "CREATE RETENTION POLICY {0} ON {1} " \
              "DURATION {2} REPLICATION {3} SHARD DURATION {4}".format(
                  quote_ident(name), quote_ident(database or self._database),
                  duration, replication, shard_duration)
  
          if default is True:
              query_string += " DEFAULT"
  
          self.query(query_string, method="POST")
docs: Create a retention policy for a database.
  
          :param name: the name of the new retention policy
          :type name: str
          :param duration: the duration of the new retention policy.
              Durations such as 1h, 90m, 12h, 7d, and 4w, are all supported
              and mean 1 hour, 90 minutes, 12 hours, 7 day, and 4 weeks,
              respectively. For infinite retention - meaning the data will
              never be deleted - use 'INF' for duration.
              The minimum retention period is 1 hour.
          :type duration: str
          :param replication: the replication of the retention policy
          :type replication: str
          :param database: the database for which the retention policy is
              created. Defaults to current client's database
          :type database: str
          :param default: whether or not to set the policy as default
          :type default: bool
          :param shard_duration: the shard duration of the retention policy.
              Durations such as 1h, 90m, 12h, 7d, and 4w, are all supported and
              mean 1 hour, 90 minutes, 12 hours, 7 day, and 4 weeks,
              respectively. Infinite retention is not supported. As a workaround,
              specify a "1000w" duration to achieve an extremely long shard group
              duration. Defaults to "0s", which is interpreted by the database
              to mean the default value given the duration.
              The minimum shard group duration is 1 hour.
          :type shard_duration: str