code: def retention_policy_exists(database, name, **client_args):
      '''
      Check if retention policy with given name exists.
  
      database
          Name of the database for which the retention policy was
          defined.
  
      name
          Name of the retention policy to check.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' influxdb.retention_policy_exists metrics default
      '''
      if get_retention_policy(database, name, **client_args):
          return True
  
      return Falsf retention_policy_exists(database, name, **client_args):
      '''
      Check if retention policy with given name exists.
  
      database
          Name of the database for which the retention policy was
          defined.
  
      name
          Name of the retention policy to check.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' influxdb.retention_policy_exists metrics default
      '''
      if get_retention_policy(database, name, **client_args):
          return True
  
      return False
docs: Check if retention policy with given name exists.
  
      database
          Name of the database for which the retention policy was
          defined.
  
      name
          Name of the retention policy to check.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' influxdb.retention_policy_exists metrics default