@contextlib.contextmanager
def PatchFlags(mock_flags=None):
  mock_flags = mock_flags or MockFlags()
  with flag_util.FlagDictSubstitution(FLAGS, mock_flags.FlagDict):
    yield mock_flags
Creates a new external_segment.
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/tests/mock_flags.py/PatchFlags--crossover with--dataset/ETHPy150Open openstack/python-group-based-policy-client/gbpclient/v2_0/client.py/Client.create_external_segment