def get_environment_variable_name(register_name: str) -> str:
    """
    Convert the name of the register to the name of the environment variable that assigns it.

    >>> get_environment_variable_name("m.motor.inductance_dq")
    'M__MOTOR__INDUCTANCE_DQ'
    """
    return register_name.upper().replace(".", "__")