docs: def learn_from_domain(self, method='random', amount=10):
          '''Learn SOM from artifacts introduced to the environment.
  
          :param str method:
              learning method, should be either 'random' or 'closest', where
              'random' chooses **amount** random artifacts, and 'closest' samples
              closest artifacts based on spirograph generation artifacts.
          :param int amount:
              Maximum amount of artifacts sampled
          :param bool last:
              Learn from last domain artifact in any case
          '''
          if method == 'none':
              return
          arts = self.env.artifacts
          if len(arts) == 0:
              return
          if 'random' in method:
              samples = min(len(arts), amount)
              ars = np.random.choice(arts, samples, replace=False)
              for a in ars:
                  self.learn(a, self.teaching_iterations)
          if 'closest' in method:
              ars = arts
              dists = []
              for a in ars:
                  args = a.framings[a.creator]['args']
                  d = np.sqrt(np.sum(np.square(args - self.spiro_args)))
                  dists.append((d,a))
              dists.sort(key=operator.itemgetter(0))
              for d,a in dists[:amount]:
                  self.learn(a, self.teaching_iterations)