def set_global_constants(posdef_inv_method=None, tf_replicator=None):
    """Sets various global constants used by the classes in this module."""
    global POSDEF_INV_METHOD
    global _TF_REPLICATOR
    if posdef_inv_method is not None:
        POSDEF_INV_METHOD = posdef_inv_method
    if tf_replicator is not None:
        _TF_REPLICATOR = tf_replicator
