def METHOD_NAME(self, tracking_context, provided_context, expected_segment_context):
    # Test first with tracking and no provided context.
    with self.tracker.context('test', tracking_context):
        segment.track(sentinel.user_id, sentinel.name, self.properties)
    args, kwargs = self.mock_segment_track.call_args  # lint-amnesty, pylint: disable=unused-variable
    assert (sentinel.user_id, sentinel.name, self.properties, expected_segment_context) == args
    # Test with provided context and no tracking context.
    segment.track(sentinel.user_id, sentinel.name, self.properties, provided_context)
    args, kwargs = self.mock_segment_track.call_args
    assert (sentinel.user_id, sentinel.name, self.properties, provided_context) == args
    # Test with provided context and also tracking context.
    with self.tracker.context('test', tracking_context):
        segment.track(sentinel.user_id, sentinel.name, self.properties, provided_context)
    assert self.mock_segment_track.called
    args, kwargs = self.mock_segment_track.call_args
    assert (sentinel.user_id, sentinel.name, self.properties, provided_context) == args