@classmethod
    def translate(cls, desired_depth):
        """Translates a string into a depth enumeration."""
        if isinstance(desired_depth, cls):
            # Nothing to do in the first place...
            return desired_depth
        if not isinstance(desired_depth, six.string_types):
            raise TypeError("Unexpected desired depth type, string type"
                            " expected, not %s" % type(desired_depth))
        try:
            return cls(desired_depth.upper())
        except __HOLE__:
            pretty_depths = sorted([a_depth.name for a_depth in cls])
            raise ValueError("Unexpected decider depth value, one of"
                             " %s (case-insensitive) is expected and"
                             " not '%s'" % (pretty_depths, desired_depth))


# Depth area of influence order (from greater influence to least).
#
# Order very much matters here...
dataset/ETHPy150Open openstack/taskflow/taskflow/deciders.py/Depth.translate