In ancient times, members of the transgender community were often integrated into religious and community life