code: def pin_update(self, from_path, to_path, **kwargs):
          
          #PY2: No support for kw-only parameters after glob parameters
          if "unpin" in kwargs:
              kwargs.setdefault("opts", {"unpin": kwargs["unpin"]})
              del kwargs["unpin"]
  
          args = (from_path, to_path)
          return self._client.request('/pin/update', args, decoder='json',
                                      **kwargs)
docs: Replaces one pin with another.
  
          Updates one pin to another, making sure that all objects in the new pin
          are local. Then removes the old pin. This is an optimized version of
          using first using :meth:`~ipfsapi.Client.pin_add` to add a new pin
          for an object and then using :meth:`~ipfsapi.Client.pin_rm` to remove
          the pin for the old object.
  
          .. code-block:: python
  
              >>> c.pin_update("QmXMqez83NU77ifmcPs5CkNRTMQksBLkyfBf4H5g1NZ52P",
              ...              "QmUykHAi1aSjMzHw3KmBoJjqRUQYNkFXm8K1y7ZsJxpfPH")
              {"Pins": ["/ipfs/QmXMqez83NU77ifmcPs5CkNRTMQksBLkyfBf4H5g1NZ52P",
                        "/ipfs/QmUykHAi1aSjMzHw3KmBoJjqRUQYNkFXm8K1y7ZsJxpfPH"]}
  
          Parameters
          ----------
          from_path : str
              Path to the old object
          to_path : str
              Path to the new object to be pinned
          unpin : bool
              Should the pin of the old object be removed? (Default: ``True``)
  
          Returns
          -------
              dict : List of IPFS objects affected by the pinning operation