class_docstr: Defines the optimisation domain of the objective function. It can be a
  continuous interval or a discrete set of numeric or non-numeric values.
  The latter is also designated as a categorical domain. It is represented as
  a Python dict object with the keys naming the variables and the values defining
  the set of allowed values. A :class:`Domain` can also be recursively
  specified. That is, a key can name a subdomain represented as a Python dict.
  
  For continuous sets use Python list to define an interval in the form
  [a, b], a < b. For discrete sets use Python sets, e.g. {1, 2, 5, -0.1}
  or {"option_a", "option_b"}.
  
  Examples:
      >>> simple_domain = {"x": {0, 1},
      >>>                  "y": [-1, 1],
      >>>                  "z": {-1, 2, 4}}
      >>> nested_domain = {"discrete": {"x": {1, 2, 3}, "y": {4, 5, 6}}
      >>>                  "continuous": {"x": [-4, 4], "y": [0, 1]}
      >>>                  "categorical": {"opt1", "opt2"}}
class_docstr_tok: ["Defines","the","optimisation","domain","of","the","objective","function",".","It","can","be","a","continuous","interval","or","a","discrete","set","of","numeric","or","non-numeric","values",".","The","latter","is","also","designated","as","a","categorical","domain",".","It","is","represented","as","a","Python","dict","object","with","the","keys","naming","the","variables","and","the","values","defining","the","set","of","allowed","values",".","A",":","class",":","`","Domain","`","can","also","be","recursively","specified",".","That","is",",","a","key","can","name","a","subdomain","represented","as","a","Python","dict",".","For","continuous","sets","use","Python","list","to","define","an","interval","in","the","form","[","a",",","b","]",",","a","<","b",".","For","discrete","sets","use","Python","sets",",","e.g",".","{","1",",","2",",","5",",","-0.1","}","or","{","``","option_a","''",",","``","option_b","''","}",".","Examples",":",">",">",">","simple_domain","=","{","``","x","''",":","{","0",",","1","}",",",">",">",">","``","y","''",":","[","-1",",","1","]",",",">",">",">","``","z","''",":","{","-1",",","2",",","4","}","}",">",">",">","nested_domain","=","{","``","discrete","''",":","{","``","x","''",":","{","1",",","2",",","3","}",",","``","y","''",":","{","4",",","5",",","6","}","}",">",">",">","``","continuous","''",":","{","``","x","''",":","[","-4",",","4","]",",","``","y","''",":","[","0",",","1","]","}",">",">",">","``","categorical","''",":","{","``","opt1","''",",","``","opt2","''","}","}"]
docstr: Split the domain into discrete, categorical and continuous
  subdomains respectively.
  
  Returns:
      A tuple of three :class:`Domain` objects for the discrete
      numerical, categorical and continuous subdomains.
docstr_tok: ["Split","the","domain","into","discrete",",","categorical","and","continuous","subdomains","respectively",".","Returns",":","A","tuple","of","three",":","class",":","`","Domain","`","objects","for","the","discrete","numerical",",","categorical","and","continuous","subdomains","."]
code: def split_by_type(self) -> Tuple["Domain", "Domain", "Domain"]:
      """Split the domain into discrete, categorical and continuous
      subdomains respectively.
  
      Returns:
          A tuple of three :class:`Domain` objects for the discrete
          numerical, categorical and continuous subdomains.
      """
      discrete, categorical, continuous = [], [], []
      for keys, vals in self.flatten().items():
          if Domain.get_type(vals) == Domain.Continuous:
              continuous.append((keys, vals))
          elif Domain.get_type(vals) == Domain.Categorical:
              categorical.append((keys, vals))
          elif Domain.get_type(vals) == Domain.Discrete:
              discrete.append((keys, vals))
          else:
              raise ValueError("Encountered an invalid subdomain.")
      return (
          Domain.from_list(discrete),
          Domain.from_list(categorical),
          Domain.from_list(continuous),
      )
  
imports: import ast
  import copy
  import os
  import pickle
  import random
  from collections import namedtuple
  from typing import Tuple
label_desc: Use image node_id 7 for calling the Domain obj's underlying member method code with example usage: obj.split_by_type() and returns: Domain,  Domain,  Domain