code: def _build_relations_config(self, yamlconfig):
          
          config = {}
          for element in yamlconfig:
              if isinstance(element, str):
                  config[element] = {'relation_name': element, 'schemas': []}
              elif isinstance(element, dict):
                  if 'relation_name' not in element or 'schemas' not in element:
                      self.log.warning("Unknown element format for relation element %s", element)
                      continue
                  if not isinstance(element['schemas'], list):
                      self.log.warning("Expected a list of schemas for %s", element)
                      continue
                  name = element['relation_name']
                  config[name] = {'relation_name': name, 'schemas': element['schemas']}
              else:
                  self.log.warning('Unhandled relations config type: {}'.format(element))
          return config
docs: Builds a dictionary from relations configuration while maintaining compatibility