def METHOD_NAME(
    self, base_cmd: str = "verify /md5", remote_file: Optional[str] = None
) -> str:
    """Calculate remote MD5 and returns the hash."""
    if remote_file is None:
        if self.direction == "put":
            remote_file = self.dest_file
        elif self.direction == "get":
            remote_file = self.source_file
        else:
            raise ValueError("self.direction is set to an invalid value")
    remote_md5_cmd = f'system "md5sum {self.file_system}/{remote_file}"'
    dest_md5 = self.ssh_ctl_chan._send_command_str(remote_md5_cmd, read_timeout=300)
    dest_md5 = self.process_md5(dest_md5)
    return dest_md5.strip()