code: def _print_SCALAR_TYPES(self, expr, *args, **kwargs):
          
          adjoint = kwargs.get('adjoint', False)
          if adjoint:
              expr = expr.conjugate()
          if isinstance(expr, SympyBasic):
              self._sympy_printer._print_level = self._print_level + 1
              res = self._sympy_printer.doprint(expr)
          else:  # numeric type
              try:
                  if int(expr) == expr:
                      # In Python, objects that evaluate equal (e.g. 2.0 == 2)
                      # have the same hash. We want to normalize this, so that we
                      # get consistent results when printing with a cache
                      expr = int(expr)
              except TypeError:
                  pass
              if adjoint:
                  kwargs = {
                      key: val for (key, val) in kwargs.items()
                      if key != 'adjoint'}
              res = self._print(expr, *args, **kwargs)
          return res
docs: Render scalars