code: def tobinary(self, values_str):
          
  
          if not isinstance(values_str, six.string_types):
              raise TypeError(
                  _format("The values string for value-mapped {0} is not "
                          "string-typed, but has Python type: {1}",
                          self._element_str(), type(values_str)))
  
          try:
              return self._v2b_dict[values_str]
          except KeyError:
              raise ValueError(
                  _format("The values string for value-mapped {0} is outside "
                          "of the set defined by its Values qualifier: {1!A}",
                          self._element_str(), values_str))
docs: Return the integer value or values for a `Values` string, based upon
          this value mapping.
  
          Any returned integer value is represented as the CIM type of the
          element (e.g. :class:`~pywbem.Uint16`).
  
          If the `Values` string corresponds to a single value, that single value
          is returned as an integer.
  
          If the `Values` string corresponds to a value range (e.g. "1.." or
          "..2" or "3..4"), that value range is returned as a tuple with two items
          that are the lowest and the highest value of the range. That is the
          case also when the value range is open on the left side or right side.
  
          If the `Values` string corresponds to the `unclaimed` indicator "..",
          `None` is returned.
  
          Parameters:
  
            values_str (:term:`string`):
              The `Values` string for the element value.
  
          Returns:
  
            :class:`~pywbem.CIMInt` or tuple of :class:`~pywbem.CIMInt` or `None`:
              The element value or value range corresponding to the `Values`
              string, or `None` for unclaimed.
  
          Raises:
  
            ValueError: `Values` string outside of the set defined by `Values`.
            TypeError: `Values` string is not a string type.