def METHOD_NAME(
    web3: Web3, abi_manager: ABIManager, constructor_spec: Union[str, Sequence]
) -> DeployedContract:
    # constructor_spec is either
    # 1) a contract name e.g. "Foo", or
    # 2) a sequence containing the contract name and
    #    constructor arguments, e.g. ["Foo", "0x1CEE82EEd89Bd5Be5bf2507a92a755dcF1D8e8dc"]
    if isinstance(constructor_spec, str):
        name = constructor_spec
        args: Sequence = ()
    else:
        name = constructor_spec[0]
        args = constructor_spec[1:]
    abi = abi_manager.get_abi(name)
    bytecode = abi_manager.get_deployment_bytecode(name)
    log.info("Deploying contract", contract=name)
    ContractFactory = cast(Contract, web3.eth.contract(abi=abi, bytecode=bytecode))
    receipt = _transact(ContractFactory.constructor(*args))
    txhash = encode_hex(receipt.transactionHash)
    address = receipt.contractAddress
    deployed = cast(DeployedContract, web3.eth.contract(address=address, abi=abi))
    deployed.deployment_block = receipt.blockNumber
    deployed.deployment_txhash = txhash
    deployed.deployment_args = list(args)
    deployed.name = name
    log.info("Deployed contract", contract=name, address=address, txhash=txhash)
    return deployed