class_docstr: docstring
class_docstr_tok: ["docstring"]
code: def __new__(cls, element, domain):
      if not isinstance(domain, Domain):
          raise TypeError("domain should be of type Domain")
      if not domain.of_type(element):
          raise TypeError(
              "element %s should be in domain %s" % (element, domain)
          )
      return cls.new(element, domain)
  
imports: from ..constructor import construct_domain
  from sympy.polys.domains import Domain, ZZ
label_desc: Use image node_id 1 for calling the DomainScalar obj's underlying member method code with example usage: obj.__new__(cls, element, domain) and returns: cls