code: def copy_file_if_newer(
      src_fs,  # type: Union[FS, Text]
      src_path,  # type: Text
      dst_fs,  # type: Union[FS, Text]
      dst_path,  # type: Text
  ):
      # type: (...) -> bool
      
      with manage_fs(src_fs, writeable=False) as _src_fs:
          with manage_fs(dst_fs, create=True) as _dst_fs:
              if _src_fs is _dst_fs:
                  # Same filesystem, so we can do a potentially optimized
                  # copy
                  if _source_is_newer(_src_fs, src_path, _dst_fs, dst_path):
                      _src_fs.copy(src_path, dst_path, overwrite=True)
                      return True
                  else:
                      return False
              else:
                  # Standard copy
                  with _src_fs.lock(), _dst_fs.lock():
                      if _source_is_newer(_src_fs, src_path, _dst_fs, dst_path):
                          copy_file_internal(_src_fs, src_path, _dst_fs, dst_path)
                          return True
                      else:
                          return False
docs: Copy a file from one filesystem to another, checking times.
  
      If the destination exists, and is a file, it will be first truncated.
      If both source and destination files exist, the copy is executed only
      if the source file is newer than the destination file. In case
      modification times of source or destination files are not available,
      copy is always executed.
  
      Arguments:
          src_fs (FS or str): Source filesystem (instance or URL).
          src_path (str): Path to a file on the source filesystem.
          dst_fs (FS or str): Destination filesystem (instance or URL).
          dst_path (str): Path to a file on the destination filesystem.
  
      Returns:
          bool: `True` if the file copy was executed, `False` otherwise.