code: def containerIsRunning(container_name):
      
      client = docker.from_env(version='auto')
      try:
          this_container = client.containers.get(container_name)
          if this_container.status == 'running':
              return True
          else:
              # this_container.status == 'exited', 'restarting', or 'paused'
              return False
      except NotFound:
          return None
      except requests.exceptions.HTTPError as e:
          logger.debug("Server error attempting to call container: ",
                        container_name)
          raise create_api_error_from_http_exception(e)
docs: Checks whether the container is running or not.
      :param container_name: Name of the container being checked.
      :returns: True if status is 'running', False if status is anything else,
      and None if the container does not exist.