| 105 | _contexts = None |
| 106 | |
| 107 | def __new__(cls, *args, **kwargs): |
| 108 | # TODO(b/174603485): Re-enable once lint stops spuriously firing here. |
| 109 | obj = super(Physics, cls).__new__(cls) # pylint: disable=no-value-for-parameter |
| 110 | # The lock is created in `__new__` rather than `__init__` because there are |
| 111 | # a number of existing subclasses that override `__init__` without calling |
| 112 | # the `__init__` method of the superclass. |
| 113 | obj._contexts_lock = threading.Lock() # pylint: disable=protected-access |
| 114 | return obj |
| 115 | |
| 116 | def __init__(self, data): |
| 117 | """Initializes a new `Physics` instance. |