code: def get_post_by_id(self, post_id):
          
          r = None
          post_id = _as_int(post_id)
          with self._engine.begin() as conn:
              try:
                  post_statement = sqla.select([self._post_table]) \
                      .where(self._post_table.c.id == post_id) \
                      .alias('post')
  
                  joined_statement = post_statement.join(self._tag_posts_table) \
                      .join(self._tag_table) \
                      .join(self._user_posts_table) \
                      .alias('join')
  
                  # Note this will retrieve one row per tag
                  all_rows = conn.execute(
                      sqla.select([joined_statement])
                  ).fetchall()
                  r = self._serialise_posts_and_tags_from_joined_rows(
                      all_rows
                  )[0]
  
              except Exception as e:
                  self._logger.exception(str(e))
                  r = None
          return r
docs: Fetch the blog post given by ``post_id``
  
          :param post_id: The post identifier for the blog post
          :type post_id: str
          :return: If the ``post_id`` is valid, the post data is retrieved, else
           returns ``None``.