5762 def _set_in_units(self, units, no_act=False):
5763 """Set the units of the application of this operator.
5764
5765 Set the degree to have units of dimensionless, and the operand to
5766 have an arbitrary member of its possible units set.
5767
5768 Where these mean the <apply> doesn't have the given units, wrap it
5769 in suitable units conversion mathematics.
5770 """
5771 app = self.xml_parent
5772 defn_units_set = app.get_units()
5773 defn_units = defn_units_set.extract()
5774 app._add_units_conversion(app, defn_units, units, no_act)
5775
5776 if not no_act:
5777 app._cml_units = defn_units
5778
5779 if hasattr(app, u'degree'):
5780 dimensionless = app.model.get_units_by_name('dimensionless')
5781 self._set_element_in_units(
_child1(app.degree), dimensionless, no_act)
5782
5783 for src_units_set, src_units in defn_units_set._get_sources(defn_units):
5784 expr = src_units_set.get_expression()
5785 self._set_element_in_units(expr, src_units, no_act)
5786