tfm.utils.get_replica_id

Gets replica id depending on the environment.