protected function getParentEntitySettings(EntityInterface $embed, ListAttribute $parent_attribute)
 {
     $parent_entity_settings = [];
     $view_scope = $this->getViewScope();
     $view_config_service = $this->getServiceLocator()->getViewConfigService();
     $parent_entity = $embed->getParent();
     if ($parent_entity) {
         // settings specified on parent entity
         $entity_renderer_config = $view_config_service->getRendererConfig($view_scope, $this->getOutputFormat(), $parent_entity);
         $all_fields_options = $entity_renderer_config->get('__all_fields', new ArrayConfig([]));
         $specific_fields_options = $entity_renderer_config->get('__fields_options', new ArrayConfig([]));
         $parent_field_options = $specific_fields_options->get('field_' . $parent_attribute->getName(), new ArrayConfig([]));
         $parent_entity_settings = array_replace_recursive($all_fields_options->toArray(), $parent_field_options->toArray());
     }
     return new ArrayConfig($parent_entity_settings);
 }