<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _CreateIndexIfNotExists(self, index_name, mappings):
 """Creates an Elasticsearch index if it does not exist. Args: index_name (str):
 mame of the index. mappings (dict[str, object]):
 mappings of the index. Raises: RuntimeError: if the Elasticsearch index cannot be created. """

    try:
      if not self._client.indices.exists(index_name):
        self._client.indices.create(
            body={'mappings': mappings}, index=index_name)

    except elasticsearch.exceptions.ConnectionError as exception:
      raise RuntimeError(
          'Unable to create Elasticsearch index with error: {0!s}'.format(
              exception))