code: def get_retention_policy(database, name, **client_args):
      '''
      Get an existing retention policy.
  
      database
          Name of the database for which the retention policy was
          defined.
  
      name
          Name of the retention policy.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' influxdb.get_retention_policy metrics default
      '''
      client = _client(**client_args)
  
      try:
          return next((p for p in client.get_list_retention_policies(database)
                       if p.get('name') == name))
      except StopIteration:
          return {f get_retention_policy(database, name, **client_args):
      '''
      Get an existing retention policy.
  
      database
          Name of the database for which the retention policy was
          defined.
  
      name
          Name of the retention policy.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' influxdb.get_retention_policy metrics default
      '''
      client = _client(**client_args)
  
      try:
          return next((p for p in client.get_list_retention_policies(database)
                       if p.get('name') == name))
      except StopIteration:
          return {}
docs: Get an existing retention policy.
  
      database
          Name of the database for which the retention policy was
          defined.
  
      name
          Name of the retention policy.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' influxdb.get_retention_policy metrics default