original_string: protected function unsetImportedRelations(array & $record)
      {
          foreach ($record as $key => $value) {
              if (strpos($key, 'role_by_') !== false ||
                  strpos($key, 'service_by_') !== false ||
                  strpos($key, 'role_service_access_by_') !== false ||
                  strpos($key, 'user_to_app_to_role_by_') !== false
              ) {
                  if (empty($value) || is_array($value)) {
                      unset($record[$key]);
                  }
              }
          }
      }
code: protected function unsetImportedRelations(array & $record)
      {
          foreach ($record as $key => $value) {
              if (strpos($key, 'role_by_') !== false ||
                  strpos($key, 'service_by_') !== false ||
                  strpos($key, 'role_service_access_by_') !== false ||
                  strpos($key, 'user_to_app_to_role_by_') !== false
              ) {
                  if (empty($value) || is_array($value)) {
                      unset($record[$key]);
                  }
              }
          }
      }
code_tokens: protected function unsetImportedRelations ( array & $ record ) { foreach ( $ record as $ key => $ value ) { if ( strpos ( $ key , 'role_by_' ) !== false || strpos ( $ key , 'service_by_' ) !== false || strpos ( $ key , 'role_service_access_by_' ) !== false || strpos ( $ key , 'user_to_app_to_role_by_' ) !== false ) { if ( empty ( $ value ) || is_array ( $ value ) ) { unset ( $ record [ $ key ] ) ; } } } }
docstring: Unset relations from record that are already imported
  such as Role, Service, Role_Service_Access.
  
  @param array $record
docstring_tokens: Unset relations from record that are already imported such as Role Service Role_Service_Access .