def METHOD_NAME(filesystem, idx=None):
    """
    Translate dictionary returned by guest-get-fsinfo info dictionary passed on
    by VDSM. When the info is retrieved using libvirt call the keys are
    slightly different.
    """
    # Example on Linux:
    # {
    #   "name": "dm-3",
    #   "total-bytes": 442427793408,
    #   "mountpoint": "/home",
    #   "disk": [ ... ],
    #   "used-bytes": 429409058816,
    #   "type": "ext4"
    # },
    filesystem = defaultdict(str, filesystem)
    if idx is not None:
        # Info comes from libvirt
        prefix = 'fs.{:d}.'.format(idx)
        fstype = '{}fstype'.format(prefix)
    else:
        prefix = ''
        fstype = 'type'
    return {
        "path": filesystem[prefix + 'mountpoint'],
        "total": str(filesystem[prefix + 'total-bytes']),
        "used": str(filesystem[prefix + 'used-bytes']),
        "fs": filesystem[fstype],
    }