def METHOD_NAME(self):
    args = self.ctx.args
    if has_value(args.subnet_name):
        subnet = {"name": args.subnet_name}
        if not has_value(args.subnet_prefixes):
            # set default value
            address, bit_mask = str(args.address_prefixes[0]).split("/")
            subnet_mask = 24 if int(bit_mask) < 24 else bit_mask
            subnet["address_prefix"] = f"{address}/{subnet_mask}"
        elif len(args.subnet_prefixes) == 1:
            subnet["address_prefix"] = args.subnet_prefixes[0]
        else:
            subnet["address_prefixes"] = args.subnet_prefixes
        if has_value(args.subnet_nsg):
            subnet["network_security_group"] = {"id": args.subnet_nsg}
        args.subnets = [subnet]