code: def expand_specializations(session, class_names):
      
      result = []
      for class_name in class_names:
          specialization = SpecializationV1.create(session, class_name)
          if specialization is None:
              result.append(class_name)
          else:
              result.extend(specialization.children)
              logging.info('Expanded specialization "%s" into the following'
                           ' classes: %s',
                           class_name, ' '.join(specialization.children))
  
      return result
docs: Checks whether any given name is not a class but a specialization.
  
      If it's a specialization, expand the list of class names with the child
      class names.