code: def cp(src_filename, dst_filename):
      
      src_dev, src_dev_filename = get_dev_and_path(src_filename)
      dst_dev, dst_dev_filename = get_dev_and_path(dst_filename)
      if src_dev is dst_dev:
          # src and dst are either on the same remote, or both are on the host
          return auto(copy_file, src_filename, dst_dev_filename)
  
      filesize = auto(get_filesize, src_filename)
  
      if dst_dev is None:
          # Copying from remote to host
          with open(dst_dev_filename, 'wb') as dst_file:
              return src_dev.remote(send_file_to_host, src_dev_filename, dst_file,
                                    filesize, xfer_func=recv_file_from_remote)
      if src_dev is None:
          # Copying from host to remote
          with open(src_dev_filename, 'rb') as src_file:
              return dst_dev.remote(recv_file_from_host, src_file, dst_dev_filename,
                                    filesize, xfer_func=send_file_to_remote)
  
      # Copying from remote A to remote B. We first copy the file
      # from remote A to the host and then from the host to remote B
      host_temp_file = tempfile.TemporaryFile()
      if src_dev.remote(send_file_to_host, src_dev_filename, host_temp_file,
                        filesize, xfer_func=recv_file_from_remote):
          host_temp_file.seek(0)
          return dst_dev.remote(recv_file_from_host, host_temp_file, dst_dev_filename,
                                filesize, xfer_func=send_file_to_remote)
      return False
docs: Copies one file to another. The source file may be local or remote and
         the destination file may be local or remote.