Check if container with the given name or ID (str) is running. No side
    effects. Idempotent. Returns True if running, False if not.

def containerIsRunning(name_or_id):
    '''Check if container with the given name or ID (str) is running. No side
    effects. Idempotent. Returns True if running, False if not.'''
    require_str("name_or_id", name_or_id)

    try:
        container = getContainer(name_or_id)
        # Refer to the latest status list here: https://docs.docker.com/engine/
        #   api/v1.33/#operation/ContainerList
        if container:
            if container.status == 'created':
              return False
            elif container.status == 'restarting':
              return True
            elif container.status == 'running':
              return True
            elif container.status == 'removing':
              return False
            elif container.status == 'paused':
              return False
            elif container.status == 'exited':
              return False
            elif container.status == 'dead':
              return False
            else:
              return False
    except NotFound as exc:
        return False

    return False