def METHOD_NAME(target, source, env, for_signature):
    """Function to determine what to use for SOVERSION"""
    if 'SOVERSION' in env:
        return '.$SOVERSION'
    elif 'LDMODULEVERSION' in env:
        ldmod_version = env.subst('$LDMODULEVERSION')
        # We use only the most significant digit of LDMODULEVERSION
        return '.' + ldmod_version.split('.')[0]
    else:
        return ''