original_string: public function get_all_samples(\core_analytics\analysable $user) {
  
          $context = \context_user::instance($user->get_id());
  
          // Just 1 sample per analysable.
          return [
              [$user->get_id() => $user->get_id()],
              [$user->get_id() => ['user' => $user->get_user_data(), 'context' => $context]]
          ];
      }
code: public function get_all_samples(\core_analytics\analysable $user) {
  
          $context = \context_user::instance($user->get_id());
  
          // Just 1 sample per analysable.
          return [
              [$user->get_id() => $user->get_id()],
              [$user->get_id() => ['user' => $user->get_user_data(), 'context' => $context]]
          ];
      }
code_tokens: public function get_all_samples ( \ core_analytics \ analysable $ user ) { $ context = \ context_user :: instance ( $ user -> get_id ( ) ) ; // Just 1 sample per analysable. return [ [ $ user -> get_id ( ) => $ user -> get_id ( ) ] , [ $ user -> get_id ( ) => [ 'user' => $ user -> get_user_data ( ) , 'context' => $ context ] ] ] ; }
docstring: This will return just one user as we analyse users separately.
  
  @param \core_analytics\analysable $user
  @return array
docstring_tokens: This will return just one user as we analyse users separately .