original_string: public function get_author_profile_image_url(author_entity $author, int $authorcontextid = null) : moodle_url {
          global $PAGE;
  
          $datamapper = $this->legacydatamapperfactory->get_author_data_mapper();
          $record = $datamapper->to_legacy_object($author);
          $record->contextid = $authorcontextid;
          $userpicture = new user_picture($record);
          $userpicture->size = 2;
  
          return $userpicture->get_url($PAGE);
      }
code: public function get_author_profile_image_url(author_entity $author, int $authorcontextid = null) : moodle_url {
          global $PAGE;
  
          $datamapper = $this->legacydatamapperfactory->get_author_data_mapper();
          $record = $datamapper->to_legacy_object($author);
          $record->contextid = $authorcontextid;
          $userpicture = new user_picture($record);
          $userpicture->size = 2;
  
          return $userpicture->get_url($PAGE);
      }
code_tokens: public function get_author_profile_image_url ( author_entity $ author , int $ authorcontextid = null ) : moodle_url { global $ PAGE ; $ datamapper = $ this -> legacydatamapperfactory -> get_author_data_mapper ( ) ; $ record = $ datamapper -> to_legacy_object ( $ author ) ; $ record -> contextid = $ authorcontextid ; $ userpicture = new user_picture ( $ record ) ; $ userpicture -> size = 2 ; return $ userpicture -> get_url ( $ PAGE ) ; }
docstring: Get the url to view the author's profile image. The author's context id should be
  provided to prevent the code from needing to load it.
  
  @param author_entity $author The author
  @param int|null $authorcontextid The author context id
  @return moodle_url
docstring_tokens: Get the url to view the author s profile image . The author s context id should be provided to prevent the code from needing to load it .