Refactor this to a reusable (injectable) function that transforms a Docker state to a jclouds node Status?