from typing import Dict
from typing import Optional


def get_gsx_entry_value(entry: Dict[str, Dict[str, str]], field: str) -> Optional[str]:
    """Returns the `entry` value for the given `field`."""
    if not entry or not field:
        return None

    field = f"gsx${field}"
    if field not in entry:
        return None

    return entry[field]["$t"].strip()