original_string: public function insertTagEntry($tag, $uri = null)
      {
          if ($uri instanceof Zend_Gdata_Photos_PhotoEntry) {
              $uri = $uri->getLink(self::FEED_LINK_PATH)->href;
          }
          if ($uri === null) {
              require_once 'Zend/Gdata/App/InvalidArgumentException.php';
              throw new Zend_Gdata_App_InvalidArgumentException(
                      'URI must not be null');
          }
          $newEntry = $this->insertEntry($tag, $uri, 'Zend_Gdata_Photos_TagEntry');
          return $newEntry;
      }
code: public function insertTagEntry($tag, $uri = null)
      {
          if ($uri instanceof Zend_Gdata_Photos_PhotoEntry) {
              $uri = $uri->getLink(self::FEED_LINK_PATH)->href;
          }
          if ($uri === null) {
              require_once 'Zend/Gdata/App/InvalidArgumentException.php';
              throw new Zend_Gdata_App_InvalidArgumentException(
                      'URI must not be null');
          }
          $newEntry = $this->insertEntry($tag, $uri, 'Zend_Gdata_Photos_TagEntry');
          return $newEntry;
      }
code_tokens: public function insertTagEntry ( $ tag , $ uri = null ) { if ( $ uri instanceof Zend_Gdata_Photos_PhotoEntry ) { $ uri = $ uri -> getLink ( self :: FEED_LINK_PATH ) -> href ; } if ( $ uri === null ) { require_once 'Zend/Gdata/App/InvalidArgumentException.php' ; throw new Zend_Gdata_App_InvalidArgumentException ( 'URI must not be null' ) ; } $ newEntry = $ this -> insertEntry ( $ tag , $ uri , 'Zend_Gdata_Photos_TagEntry' ) ; return $ newEntry ; }
docstring: Create a new tag from a TagEntry.
  
  @param Zend_Gdata_Photos_TagEntry $tag The tag entry to insert.
  @param string $url The URI where the tag should be
  uploaded to. Alternatively, a PhotoEntry can be provided and
  the tag will be added to that photo.
  @return Zend_Gdata_Photos_TagEntry The inserted tag entry as returned
  by the server.
  @throws Zend_Gdata_App_Exception
  @throws Zend_Gdata_App_HttpException
docstring_tokens: Create a new tag from a TagEntry .