code: public function getDataSources()
      {
          if (is_null($this->_dataSources)) {
              $this->_dataSources = [];
              foreach ($this->dataSources() as $foreignModel => $dataSource) {
                  if (is_numeric($foreignModel) || isset($dataSources['foreignModel'])) {
                      if (!isset($dataSources['foreignModel'])) {
                          continue;
                      }
                      $foreignModel = $dataSources['foreignModel'];
                      unset($dataSources['foreignModel']);
                  }
                  if (!isset($dataSource['class'])) {
                      $dataSource['class'] = $this->dataSourceClass;
                  }
                  $dataSource['name'] = $foreignModel;
                  $dataSource['foreignModel'] = $this->getForeignModel($foreignModel);
                  if (empty($dataSource['foreignModel'])) {
                      continue;
                  }
                  $this->_dataSources[$foreignModel] = Yii::createObject(array_merge(['module' => $this], $dataSource));
              }
          }
  
          return $this->_dataSources;
      }
docs: Get data sources.
  
  @return [[@doctodo return_type:getDataSources]] [[@doctodo return_description:getDataSources]]