def create_help_command_table(self):
        commands = {}
        for command in self.SUBCOMMANDS:
            commands[command['name']] = command['command_class'](self._session)
        self._add_lineage(commands)
        return commands
create_help_command_table(self=<awscli.customizations.s3.s3.S3 object at 0x7f521c000700>, self._arg_table=None, self._lineage=[<awscli.customizations.s3.s3.S3 object at 0x7f521c000700>], self._session=<botocore.session.Session object at 0x7f521d1a98b0>, self._subcommand_table=None)

{'ls': <awscli.customizations.s3.subcommands.ListCommand object at 0x7f51ddc685e0>}

{'ls': <awscli.customizations.s3.subcommands.ListCommand object at 0x7f51ddc685e0>, 'website': <awscli.customizations.s3.subcommands.WebsiteCommand object at 0x7f51ddc68280>}

{'ls': <awscli.customizations.s3.subcommands.ListCommand object at 0x7f51ddc685e0>, 'website': <awscli.customizations.s3.subcommands.WebsiteCommand object at 0x7f51ddc68280>, 'cp': <awscli.customizations.s3.subcommands.CpCommand object at 0x7f51dd6c3670>}

{'ls': <awscli.customizations.s3.subcommands.ListCommand object at 0x7f51ddc685e0>, 'website': <awscli.customizations.s3.subcommands.WebsiteCommand object at 0x7f51ddc68280>, 'cp': <awscli.customizations.s3.subcommands.CpCommand object at 0x7f51dd6c3670>, 'mv': <awscli.customizations.s3.subcommands.MvCommand object at 0x7f51dd6c3550>}

{'ls': <awscli.customizations.s3.subcommands.ListCommand object at 0x7f51ddc685e0>, 'website': <awscli.customizations.s3.subcommands.WebsiteCommand object at 0x7f51ddc68280>, 'cp': <awscli.customizations.s3.subcommands.CpCommand object at 0x7f51dd6c3670>, 'mv': <awscli.customizations.s3.subcommands.MvCommand object at 0x7f51dd6c3550>, 'rm': <awscli.customizations.s3.subcommands.RmCommand object at 0x7f51dd6c36a0>}

{'ls': <awscli.customizations.s3.subcommands.ListCommand object at 0x7f51ddc685e0>, 'website': <awscli.customizations.s3.subcommands.WebsiteCommand object at 0x7f51ddc68280>, 'cp': <awscli.customizations.s3.subcommands.CpCommand object at 0x7f51dd6c3670>, 'mv': <awscli.customizations.s3.subcommands.MvCommand object at 0x7f51dd6c3550>, 'rm': <awscli.customizations.s3.subcommands.RmCommand object at 0x7f51dd6c36a0>, 'sync': <awscli.customizations.s3.subcommands.SyncCommand object at 0x7f51dd6c37c0>}

{'ls': <awscli.customizations.s3.subcommands.ListCommand object at 0x7f51ddc685e0>, 'website': <awscli.customizations.s3.subcommands.WebsiteCommand object at 0x7f51ddc68280>, 'cp': <awscli.customizations.s3.subcommands.CpCommand object at 0x7f51dd6c3670>, 'mv': <awscli.customizations.s3.subcommands.MvCommand object at 0x7f51dd6c3550>, 'rm': <awscli.customizations.s3.subcommands.RmCommand object at 0x7f51dd6c36a0>, 'sync': <awscli.customizations.s3.subcommands.SyncCommand object at 0x7f51dd6c37c0>, 'mb': <awscli.customizations.s3.subcommands.MbCommand object at 0x7f51dd6c3490>}

{'ls': <awscli.customizations.s3.subcommands.ListCommand object at 0x7f51ddc685e0>, 'website': <awscli.customizations.s3.subcommands.WebsiteCommand object at 0x7f51ddc68280>, 'cp': <awscli.customizations.s3.subcommands.CpCommand object at 0x7f51dd6c3670>, 'mv': <awscli.customizations.s3.subcommands.MvCommand object at 0x7f51dd6c3550>, 'rm': <awscli.customizations.s3.subcommands.RmCommand object at 0x7f51dd6c36a0>, 'sync': <awscli.customizations.s3.subcommands.SyncCommand object at 0x7f51dd6c37c0>, 'mb': <awscli.customizations.s3.subcommands.MbCommand object at 0x7f51dd6c3490>, 'rb': <awscli.customizations.s3.subcommands.RbCommand object at 0x7f51dd6c3a60>}

{'ls': <awscli.customizations.s3.subcommands.ListCommand object at 0x7f51ddc685e0>, 'website': <awscli.customizations.s3.subcommands.WebsiteCommand object at 0x7f51ddc68280>, 'cp': <awscli.customizations.s3.subcommands.CpCommand object at 0x7f51dd6c3670>, 'mv': <awscli.customizations.s3.subcommands.MvCommand object at 0x7f51dd6c3550>, 'rm': <awscli.customizations.s3.subcommands.RmCommand object at 0x7f51dd6c36a0>, 'sync': <awscli.customizations.s3.subcommands.SyncCommand object at 0x7f51dd6c37c0>, 'mb': <awscli.customizations.s3.subcommands.MbCommand object at 0x7f51dd6c3490>, 'rb': <awscli.customizations.s3.subcommands.RbCommand object at 0x7f51dd6c3a60>, 'presign': <awscli.customizations.s3.subcommands.PresignCommand object at 0x7f51dd6c3820>}

{'name': 'ls', 'command_class': <class 'awscli.customizations.s3.subcommands.ListCommand'>}

{'name': 'website', 'command_class': <class 'awscli.customizations.s3.subcommands.WebsiteCommand'>}

{'name': 'cp', 'command_class': <class 'awscli.customizations.s3.subcommands.CpCommand'>}

{'name': 'mv', 'command_class': <class 'awscli.customizations.s3.subcommands.MvCommand'>}

{'name': 'rm', 'command_class': <class 'awscli.customizations.s3.subcommands.RmCommand'>}

{'name': 'sync', 'command_class': <class 'awscli.customizations.s3.subcommands.SyncCommand'>}

{'name': 'mb', 'command_class': <class 'awscli.customizations.s3.subcommands.MbCommand'>}

{'name': 'rb', 'command_class': <class 'awscli.customizations.s3.subcommands.RbCommand'>}

{'name': 'presign', 'command_class': <class 'awscli.customizations.s3.subcommands.PresignCommand'>}


def arg_table(self):
        if self._arg_table is None:
            self._arg_table = self._build_arg_table()
        return self._arg_table
arg_table(self=<awscli.customizations.s3.s3.S3 object at 0x7f521c000700>, self._arg_table=None, self._lineage=[<awscli.customizations.s3.s3.S3 object at 0x7f521c000700>], self._session=<botocore.session.Session object at 0x7f521d1a98b0>, self._subcommand_table=None)


def _build_arg_table(self):
        arg_table = OrderedDict()
        self._session.emit('building-arg-table.%s' % self.NAME,
                           arg_table=self.ARG_TABLE)
        for arg_data in self.ARG_TABLE:
            if 'schema' in arg_data:
                argument_model = create_argument_model_from_schema(
                    arg_data.pop('schema'))
                arg_data['argument_model'] = argument_model
            custom_argument = CustomArgument(**arg_data)
            arg_table[arg_data['name']] = custom_argument
        return arg_table
_build_arg_table(self=<awscli.customizations.s3.s3.S3 object at 0x7f521c000700>, self._arg_table=None, self._lineage=[<awscli.customizations.s3.s3.S3 object at 0x7f521c000700>], self._session=<botocore.session.Session object at 0x7f521d1a98b0>, self._subcommand_table=None)


def dict_to_ini_section(ini_dict, section_header):
    section_str = f'[{section_header}]\n'
    for key, value in ini_dict.items():
        if isinstance(value, dict):
            section_str += f"{key} =\n"
            for new_key, new_value in value.items():
                section_str += f"  {new_key}={new_value}\n"
        else:
            section_str += f"{key}={value}\n"
    return section_str + "\n"
dict_to_ini_section(ini_dict={'aws_access_key_id': '123', 'aws_secret_access_key': '456', 'region': 'fake-region-10', 'endpoint_url': 'https://global.endpoint.aws'}, section_header='profile service_global_only')


def requires_crt(reason=None):
    if reason is None:
        reason = "Test requires awscrt to be installed"
    def decorator(func):
        return unittest.skipIf(not HAS_CRT, reason)(func)
    return decorator
requires_crt(reason=None)

<function requires_crt.<locals>.decorator at 0x7f51d80bc0d0>


def _create_argument_table(self):
        argument_table = OrderedDict()
        input_shape = self._operation_model.input_shape
        required_arguments = []
        arg_dict = {}
        if input_shape is not None:
            required_arguments = input_shape.required_members
            arg_dict = input_shape.members
        for arg_name, arg_shape in arg_dict.items():
            cli_arg_name = xform_name(arg_name, '-')
            arg_class = self.ARG_TYPES.get(arg_shape.type_name,
                                           self.DEFAULT_ARG_CLASS)
            is_token = arg_shape.metadata.get('idempotencyToken', False)
            is_required = arg_name in required_arguments and not is_token
            event_emitter = self._session.get_component('event_emitter')
            arg_object = arg_class(
                name=cli_arg_name,
                argument_model=arg_shape,
                is_required=is_required,
                operation_model=self._operation_model,
                serialized_name=arg_name,
                event_emitter=event_emitter)
            arg_object.add_to_arg_table(argument_table)
        LOG.debug(argument_table)
        self._emit('building-argument-table.%s.%s' % (self._parent_name,
                                                      self._name),
                   operation_model=self._operation_model,
                   session=self._session,
                   command=self,
                   argument_table=argument_table)
        return argument_table
_create_argument_table(self=<awscli.clidriver.ServiceOperation object at 0x7f51d7514100>, self._arg_table=None, self._lineage=[<awscli.clidriver.ServiceCommand object at 0x7f51d7cb2e20>, <awscli.clidriver.ServiceOperation object at 0x7f51d7514100>], self._name='apply-archive-rule', self._operation_caller=<awscli.clidriver.CLIOperationCaller object at 0x7f51d75148b0>, self._operation_model=OperationModel(name=ApplyArchiveRule), self._parent_name='accessanalyzer', self._session=<botocore.session.Session object at 0x7f51d7ea6160>)

OrderedDict([('analyzer-arn', <awscli.arguments.CLIArgument object at 0x7f51d72530a0>)])

OrderedDict([('analyzer-arn', <awscli.arguments.CLIArgument object at 0x7f51d72530a0>), ('rule-name', <awscli.arguments.CLIArgument object at 0x7f51d7253430>)])

OrderedDict([('analyzer-arn', <awscli.arguments.CLIArgument object at 0x7f51d72530a0>), ('rule-name', <awscli.arguments.CLIArgument object at 0x7f51d7253430>), ('client-token', <awscli.arguments.CLIArgument object at 0x7f51d7253190>)])

OrderedDict([('analyzer-arn', <awscli.arguments.CLIArgument object at 0x7f51d72530a0>), ('rule-name', <awscli.arguments.CLIArgument object at 0x7f51d7253430>), ('client-token', <awscli.arguments.CLIArgument object at 0x7f51d7253190>), ('cli-input-json', <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x7f51d7253070>), ('generate-cli-skeleton', <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x7f51d72534f0>)])

OrderedDict([('analyzerArn', <StringShape(AnalyzerArn)>), ('ruleName', <StringShape(Name)>), ('clientToken', <StringShape(String)>)])

{_event_aliases={'a4b': 'alexa-for-business', 'alexaforbusiness': 'alexa-for-business', 'api.mediatailor': 'mediatailor', 'api.pricing': 'pricing', 'api.sagemaker': 'sagemaker', 'apigateway': 'api-gateway', 'application-autoscaling': 'application-auto-scaling', 'appstream2': 'appstream', 'autoscaling': 'auto-scaling', 'autoscaling-plans': 'auto-scaling-plans', 'ce': 'cost-explorer', 'cloudhsmv2': 'cloudhsm-v2', 'cloudsearchdomain': 'cloudsearch-domain', 'cognito-idp': 'cognito-identity-provider', 'config': 'config-service', 'cur': 'cost-and-usage-report-service', 'data.iot': 'iot-data-plane', 'data.jobs.iot': 'iot-jobs-data-plane', 'data.mediastore': 'mediastore-data', 'datapipeline': 'data-pipeline', 'devicefarm': 'device-farm', 'devices.iot1click': 'iot-1click-devices-service', 'directconnect': 'direct-connect', 'discovery': 'application-discovery-service', 'dms': 'database-migration-service', 'ds': 'directory-service', 'dynamodbstreams': 'dynamodb-streams', 'elasticbeanstalk': 'elastic-beanstalk', 'elasticfilesystem': 'efs', 'elasticloadbalancing': 'elastic-load-balancing', 'elasticmapreduce': 'emr', 'elastictranscoder': 'elastic-transcoder', 'elb': 'elastic-load-balancing', 'elbv2': 'elastic-load-balancing-v2', 'email': 'ses', 'entitlement.marketplace': 'marketplace-entitlement-service', 'es': 'elasticsearch-service', 'events': 'eventbridge', 'cloudwatch-events': 'eventbridge', 'iot-data': 'iot-data-plane', 'iot-jobs-data': 'iot-jobs-data-plane', 'iot1click-devices': 'iot-1click-devices-service', 'iot1click-projects': 'iot-1click-projects', 'kinesisanalytics': 'kinesis-analytics', 'kinesisvideo': 'kinesis-video', 'lex-models': 'lex-model-building-service', 'lex-runtime': 'lex-runtime-service', 'logs': 'cloudwatch-logs', 'machinelearning': 'machine-learning', 'marketplace-entitlement': 'marketplace-entitlement-service', 'marketplacecommerceanalytics': 'marketplace-commerce-analytics', 'metering.marketplace': 'marketplace-metering', 'meteringmarketplace': 'marketplace-metering', 'mgh': 'migration-hub', 'models.lex': 'lex-model-building-service', 'monitoring': 'cloudwatch', 'mturk-requester': 'mturk', 'opsworks-cm': 'opsworkscm', 'projects.iot1click': 'iot-1click-projects', 'resourcegroupstaggingapi': 'resource-groups-tagging-api', 'route53': 'route-53', 'route53domains': 'route-53-domains', 'runtime.lex': 'lex-runtime-service', 'runtime.sagemaker': 'sagemaker-runtime', 'sdb': 'simpledb', 'secretsmanager': 'secrets-manager', 'serverlessrepo': 'serverlessapplicationrepository', 'servicecatalog': 'service-catalog', 'states': 'sfn', 'stepfunctions': 'sfn', 'storagegateway': 'storage-gateway', 'streams.dynamodb': 'dynamodb-streams', 'tagging': 'resource-groups-tagging-api'}, _alias_name_cache={'choose-service-name': 'choose-service-name', 'getattr.mturk.list_hi_ts_for_qualification_type': 'getattr.mturk.list_hi_ts_for_qualification_type', 'before-parameter-build.s3.UploadPart': 'before-parameter-build.s3.UploadPart', 'before-parameter-build.s3.PutObject': 'before-parameter-build.s3.PutObject', 'creating-client-class': 'creating-client-class', 'creating-client-class.s3': 'creating-client-class.s3', 'creating-client-class.iot-data': 'creating-client-class.iot-data-plane', 'creating-client-class.lex-runtime-v2': 'creating-client-class.lex-runtime-v2', 'after-call.iam': 'after-call.iam', 'after-call.ec2.GetConsoleOutput': 'after-call.ec2.GetConsoleOutput', 'after-call.cloudformation.GetTemplate': 'after-call.cloudformation.GetTemplate', 'after-call.s3.GetBucketLocation': 'after-call.s3.GetBucketLocation', 'before-parameter-build': 'before-parameter-build', 'before-parameter-build.s3': 'before-parameter-build.s3', 'before-parameter-build.s3.ListObjects': 'before-parameter-build.s3.ListObjects', 'before-parameter-build.s3.ListObjectsV2': 'before-parameter-build.s3.ListObjectsV2', 'before-parameter-build.s3.ListObjectVersions': 'before-parameter-build.s3.ListObjectVersions', 'before-parameter-build.s3.CopyObject': 'before-parameter-build.s3.CopyObject', 'before-parameter-build.s3.UploadPartCopy': 'before-parameter-build.s3.Uploa...gister-application-revision', 'building-argument-table.deploy.create-deployment': 'building-argument-table.deploy.create-deployment', 'building-command-table.configservice': 'building-command-table.configservice', 'building-command-table.opsworks': 'building-command-table.opsworks', 'building-argument-table.lambda.create-function': 'building-argument-table.lambda.create-function', 'building-argument-table.lambda.publish-layer-version': 'building-argument-table.lambda.publish-layer-version', 'building-argument-table.lambda.update-function-code': 'building-argument-table.lambda.update-function-code', 'process-cli-arg.lambda.update-function-code': 'process-cli-arg.lambda.update-function-code', 'doc-title.kms.create-grant': 'doc-title.kms.create-grant', 'doc-option.route53.create-hosted-zone.hosted-zone-config': 'doc-option.route-53.create-hosted-zone.hosted-zone-config', 'building-argument-table.configservice.put-configuration-recorder': 'building-argument-table.configservice.put-configuration-recorder', 'building-command-table.codeartifact': 'building-command-table.codeartifact', 'building-command-table.codecommit': 'building-command-table.codecommit', 'doc-description.iot-data': 'doc-description.iot-data-plane', 'building-argument-table.iot.create-keys-and-certificate': 'building-argument-table.iot.create-keys-and-certificate', 'building-argument-table.iot.create-certificate-from-csr': 'building-argument-table.iot.create-certificate-from-csr', 'building-command-table.cloudfront': 'building-command-table.cloudfront', 'building-argument-table.cloudfront.create-invalidation': 'building-argument-table.cloudfront.create-invalidation', 'operation-args-parsed.cloudfront.create-invalidation': 'operation-args-parsed.cloudfront.create-invalidation', 'operation-args-parsed.cloudfront.create-distribution': 'operation-args-parsed.cloudfront.create-distribution', 'building-argument-table.cloudfront.create-distribution': 'building-argument-table.cloudfront.create-distribution', 'operation-args-parsed.cloudfront.update-distribution': 'operation-args-parsed.cloudfront.update-distribution', 'building-argument-table.cloudfront.update-distribution': 'building-argument-table.cloudfront.update-distribution', 'building-command-table.gamelift': 'building-command-table.gamelift', 'calling-command.ec2.describe-volumes': 'calling-command.ec2.describe-volumes', 'calling-command.ec2.describe-snapshots': 'calling-command.ec2.describe-snapshots', 'building-command-table.cloudformation': 'building-command-table.cloudformation', 'building-command-table.mturk': 'building-command-table.mturk', 'building-command-table.servicecatalog': 'building-command-table.service-catalog', 'building-argument-table.translate.import-terminology': 'building-argument-table.translate.import-terminology', 'building-argument-table.translate.translate-document': 'building-argument-table.translate.translate-document', 'building-argument-table.s3api.select-object-content': 'building-argument-table.s3api.select-object-content', 'doc-output.s3api.select-object-content': 'doc-output.s3api.select-object-content', 'building-command-table.dlm': 'building-command-table.dlm', 'building-command-table.ssm': 'building-command-table.ssm', 'calling-command.dynamodb.*': 'calling-command.dynamodb.*', 'before-building-argument-table-parser': 'before-building-argument-table-parser', 'building-argument-table.kinesis.list-streams': 'building-argument-table.kinesis.list-streams', 'operation-args-parsed.kinesis.list-streams': 'operation-args-parsed.kinesis.list-streams', 'building-argument-table.quicksight.start-asset-bundle-import-job': 'building-argument-table.quicksight.start-asset-bundle-import-job', 'service-data-loaded.simpledb': 'service-data-loaded.simpledb', 'doc-description.sdb': 'doc-description.simpledb', 'building-top-level-params': 'building-top-level-params', 'service-data-loaded.accessanalyzer': 'service-data-loaded.accessanalyzer', 'building-command-table.accessanalyzer': 'building-command-table.accessanalyzer'}, _emitter=<botocore.hooks.HierarchicalEmitter object at 0x7f51d7ea6250>}

{_event_aliases={'a4b': 'alexa-for-business', 'alexaforbusiness': 'alexa-for-business', 'api.mediatailor': 'mediatailor', 'api.pricing': 'pricing', 'api.sagemaker': 'sagemaker', 'apigateway': 'api-gateway', 'application-autoscaling': 'application-auto-scaling', 'appstream2': 'appstream', 'autoscaling': 'auto-scaling', 'autoscaling-plans': 'auto-scaling-plans', 'ce': 'cost-explorer', 'cloudhsmv2': 'cloudhsm-v2', 'cloudsearchdomain': 'cloudsearch-domain', 'cognito-idp': 'cognito-identity-provider', 'config': 'config-service', 'cur': 'cost-and-usage-report-service', 'data.iot': 'iot-data-plane', 'data.jobs.iot': 'iot-jobs-data-plane', 'data.mediastore': 'mediastore-data', 'datapipeline': 'data-pipeline', 'devicefarm': 'device-farm', 'devices.iot1click': 'iot-1click-devices-service', 'directconnect': 'direct-connect', 'discovery': 'application-discovery-service', 'dms': 'database-migration-service', 'ds': 'directory-service', 'dynamodbstreams': 'dynamodb-streams', 'elasticbeanstalk': 'elastic-beanstalk', 'elasticfilesystem': 'efs', 'elasticloadbalancing': 'elastic-load-balancing', 'elasticmapreduce': 'emr', 'elastictranscoder': 'elastic-transcoder', 'elb': 'elastic-load-balancing', 'elbv2': 'elastic-load-balancing-v2', 'email': 'ses', 'entitlement.marketplace': 'marketplace-entitlement-service', 'es': 'elasticsearch-service', 'events': 'eventbridge', 'cloudwatch-events': 'eventbridge', 'iot-data': 'iot-data-plane', 'iot-jobs-data': 'iot-jobs-data-plane', 'iot1click-devices': 'iot-1click-devices-service', 'iot1click-projects': 'iot-1click-projects', 'kinesisanalytics': 'kinesis-analytics', 'kinesisvideo': 'kinesis-video', 'lex-models': 'lex-model-building-service', 'lex-runtime': 'lex-runtime-service', 'logs': 'cloudwatch-logs', 'machinelearning': 'machine-learning', 'marketplace-entitlement': 'marketplace-entitlement-service', 'marketplacecommerceanalytics': 'marketplace-commerce-analytics', 'metering.marketplace': 'marketplace-metering', 'meteringmarketplace': 'marketplace-metering', 'mgh': 'migration-hub', 'models.lex': 'lex-model-building-service', 'monitoring': 'cloudwatch', 'mturk-requester': 'mturk', 'opsworks-cm': 'opsworkscm', 'projects.iot1click': 'iot-1click-projects', 'resourcegroupstaggingapi': 'resource-groups-tagging-api', 'route53': 'route-53', 'route53domains': 'route-53-domains', 'runtime.lex': 'lex-runtime-service', 'runtime.sagemaker': 'sagemaker-runtime', 'sdb': 'simpledb', 'secretsmanager': 'secrets-manager', 'serverlessrepo': 'serverlessapplicationrepository', 'servicecatalog': 'service-catalog', 'states': 'sfn', 'stepfunctions': 'sfn', 'storagegateway': 'storage-gateway', 'streams.dynamodb': 'dynamodb-streams', 'tagging': 'resource-groups-tagging-api'}, _alias_name_cache={'choose-service-name': 'choose-service-name', 'getattr.mturk.list_hi_ts_for_qualification_type': 'getattr.mturk.list_hi_ts_for_qualification_type', 'before-parameter-build.s3.UploadPart': 'before-parameter-build.s3.UploadPart', 'before-parameter-build.s3.PutObject': 'before-parameter-build.s3.PutObject', 'creating-client-class': 'creating-client-class', 'creating-client-class.s3': 'creating-client-class.s3', 'creating-client-class.iot-data': 'creating-client-class.iot-data-plane', 'creating-client-class.lex-runtime-v2': 'creating-client-class.lex-runtime-v2', 'after-call.iam': 'after-call.iam', 'after-call.ec2.GetConsoleOutput': 'after-call.ec2.GetConsoleOutput', 'after-call.cloudformation.GetTemplate': 'after-call.cloudformation.GetTemplate', 'after-call.s3.GetBucketLocation': 'after-call.s3.GetBucketLocation', 'before-parameter-build': 'before-parameter-build', 'before-parameter-build.s3': 'before-parameter-build.s3', 'before-parameter-build.s3.ListObjects': 'before-parameter-build.s3.ListObjects', 'before-parameter-build.s3.ListObjectsV2': 'before-parameter-build.s3.ListObjectsV2', 'before-parameter-build.s3.ListObjectVersions': 'before-parameter-build.s3.ListObjectVersions', 'before-parameter-build.s3.CopyObject': 'before-parameter-build.s3.CopyObject', 'before-parameter-build.s3.UploadPartCopy': 'before-parameter-build.s3.Uploa...service': 'building-command-table.configservice', 'building-command-table.opsworks': 'building-command-table.opsworks', 'building-argument-table.lambda.create-function': 'building-argument-table.lambda.create-function', 'building-argument-table.lambda.publish-layer-version': 'building-argument-table.lambda.publish-layer-version', 'building-argument-table.lambda.update-function-code': 'building-argument-table.lambda.update-function-code', 'process-cli-arg.lambda.update-function-code': 'process-cli-arg.lambda.update-function-code', 'doc-title.kms.create-grant': 'doc-title.kms.create-grant', 'doc-option.route53.create-hosted-zone.hosted-zone-config': 'doc-option.route-53.create-hosted-zone.hosted-zone-config', 'building-argument-table.configservice.put-configuration-recorder': 'building-argument-table.configservice.put-configuration-recorder', 'building-command-table.codeartifact': 'building-command-table.codeartifact', 'building-command-table.codecommit': 'building-command-table.codecommit', 'doc-description.iot-data': 'doc-description.iot-data-plane', 'building-argument-table.iot.create-keys-and-certificate': 'building-argument-table.iot.create-keys-and-certificate', 'building-argument-table.iot.create-certificate-from-csr': 'building-argument-table.iot.create-certificate-from-csr', 'building-command-table.cloudfront': 'building-command-table.cloudfront', 'building-argument-table.cloudfront.create-invalidation': 'building-argument-table.cloudfront.create-invalidation', 'operation-args-parsed.cloudfront.create-invalidation': 'operation-args-parsed.cloudfront.create-invalidation', 'operation-args-parsed.cloudfront.create-distribution': 'operation-args-parsed.cloudfront.create-distribution', 'building-argument-table.cloudfront.create-distribution': 'building-argument-table.cloudfront.create-distribution', 'operation-args-parsed.cloudfront.update-distribution': 'operation-args-parsed.cloudfront.update-distribution', 'building-argument-table.cloudfront.update-distribution': 'building-argument-table.cloudfront.update-distribution', 'building-command-table.gamelift': 'building-command-table.gamelift', 'calling-command.ec2.describe-volumes': 'calling-command.ec2.describe-volumes', 'calling-command.ec2.describe-snapshots': 'calling-command.ec2.describe-snapshots', 'building-command-table.cloudformation': 'building-command-table.cloudformation', 'building-command-table.mturk': 'building-command-table.mturk', 'building-command-table.servicecatalog': 'building-command-table.service-catalog', 'building-argument-table.translate.import-terminology': 'building-argument-table.translate.import-terminology', 'building-argument-table.translate.translate-document': 'building-argument-table.translate.translate-document', 'building-argument-table.s3api.select-object-content': 'building-argument-table.s3api.select-object-content', 'doc-output.s3api.select-object-content': 'doc-output.s3api.select-object-content', 'building-command-table.dlm': 'building-command-table.dlm', 'building-command-table.ssm': 'building-command-table.ssm', 'calling-command.dynamodb.*': 'calling-command.dynamodb.*', 'before-building-argument-table-parser': 'before-building-argument-table-parser', 'building-argument-table.kinesis.list-streams': 'building-argument-table.kinesis.list-streams', 'operation-args-parsed.kinesis.list-streams': 'operation-args-parsed.kinesis.list-streams', 'building-argument-table.quicksight.start-asset-bundle-import-job': 'building-argument-table.quicksight.start-asset-bundle-import-job', 'service-data-loaded.simpledb': 'service-data-loaded.simpledb', 'doc-description.sdb': 'doc-description.simpledb', 'building-top-level-params': 'building-top-level-params', 'service-data-loaded.accessanalyzer': 'service-data-loaded.accessanalyzer', 'building-command-table.accessanalyzer': 'building-command-table.accessanalyzer', 'building-argument-table.accessanalyzer.apply-archive-rule': 'building-argument-table.accessanalyzer.apply-archive-rule', 'calling-command.*': 'calling-command.*'}, _emitter=<botocore.hooks.HierarchicalEmitter object at 0x7f51d7ea6250>}

{_name='analyzer-arn', _serialized_name='analyzerArn', argument_model=<StringShape(AnalyzerArn)>, _required=True, _operation_model=OperationModel(name=ApplyArchiveRule), _event_emitter=<botocore.hooks.EventAliaser object at 0x7f51d7ea6220>, _documentation='
The Amazon resource name (ARN) of the analyzer.
'}

{_name='rule-name', _serialized_name='ruleName', argument_model=<StringShape(Name)>, _required=True, _operation_model=OperationModel(name=ApplyArchiveRule), _event_emitter=<botocore.hooks.EventAliaser object at 0x7f51d7ea6220>, _documentation='
The name of the rule to apply.
'}

{_name='client-token', _serialized_name='clientToken', argument_model=<StringShape(String)>, _required=False, _operation_model=OperationModel(name=ApplyArchiveRule), _event_emitter=<botocore.hooks.EventAliaser object at 0x7f51d7ea6220>, _documentation='
A client token.
'}


OrderedDict([('analyzerArn', <StringShape(AnalyzerArn)>), ('ruleName', <StringShape(Name)>), ('clientToken', <StringShape(String)>)])


def _build_subcommand_table(self):
        subcommand_table = super(WaitCommand, self)._build_subcommand_table()
        self.waiter_cmd_builder.build_all_waiter_state_cmds(subcommand_table)
        self._add_lineage(subcommand_table)
        return subcommand_table
_build_subcommand_table(self=<awscli.customizations.waiters.WaitCommand object at 0x7f51d5a7e430>, __class__=<class 'awscli.customizations.waiters.WaitCommand'>, self._arg_table=None, self._lineage=[<awscli.clidriver.ServiceCommand object at 0x7f51d7cb28b0>, <awscli.customizations.waiters.WaitCommand object at 0x7f51d5a7e430>], self._model=<botocore.waiter.WaiterModel object at 0x7f51d5a7e550>, self._service_model=ServiceModel(acm), self._session=<botocore.session.Session object at 0x7f51d7ea6160>, self._subcommand_table=None, self.waiter_cmd_builder=<awscli.customizations.waiters.WaiterStateCommandBuilder object at 0x7f51d5a7e1f0>)

OrderedDict([('certificate-validated', <awscli.customizations.waiters.WaiterStateCommand object at 0x7f51d553ef40>)])


def build_all_waiter_state_cmds(self, subcommand_table):
        waiter_names = self._model.waiter_names
        for waiter_name in waiter_names:
            waiter_cli_name = xform_name(waiter_name, '-')
            subcommand_table[waiter_cli_name] = \
                self._build_waiter_state_cmd(waiter_name)
build_all_waiter_state_cmds(self=<awscli.customizations.waiters.WaiterStateCommandBuilder object at 0x7f51d5a7e1f0>, subcommand_table=OrderedDict(), self._model=<botocore.waiter.WaiterModel object at 0x7f51d5a7e550>, self._service_model=ServiceModel(acm), self._session=<botocore.session.Session object at 0x7f51d7ea6160>)


def _build_waiter_state_cmd(self, waiter_name):
        waiter_config = self._model.get_waiter(waiter_name)
        waiter_cli_name = xform_name(waiter_name, '-')
        operation_name = waiter_config.operation
        operation_model = self._service_model.operation_model(operation_name)
        waiter_state_command = WaiterStateCommand(
            name=waiter_cli_name, parent_name='wait',
            operation_caller=WaiterCaller(self._session, waiter_name),
            session=self._session,
            operation_model=operation_model,
        )
        waiter_state_doc_builder = WaiterStateDocBuilder(waiter_config)
        description = waiter_state_doc_builder.build_waiter_state_description()
        waiter_state_command.DESCRIPTION = description
        return waiter_state_command
_build_waiter_state_cmd(self=<awscli.customizations.waiters.WaiterStateCommandBuilder object at 0x7f51d5a7e1f0>, waiter_name='CertificateValidated', self._model=<botocore.waiter.WaiterModel object at 0x7f51d5a7e550>, self._service_model=ServiceModel(acm), self._session=<botocore.session.Session object at 0x7f51d7ea6160>)

{_config=OrderedDict([('delay', 60), ('maxAttempts', 40), ('operation', 'DescribeCertificate'), ('acceptors', [OrderedDict([('matcher', 'pathAll'), ('expected', 'SUCCESS'), ('argument', 'Certificate.DomainValidationOptions[].ValidationStatus'), ('state', 'success')]), OrderedDict([('matcher', 'pathAny'), ('expected', 'PENDING_VALIDATION'), ('argument', 'Certificate.DomainValidationOptions[].ValidationStatus'), ('state', 'retry')]), OrderedDict([('matcher', 'path'), ('expected', 'FAILED'), ('argument', 'Certificate.Status'), ('state', 'failure')]), OrderedDict([('matcher', 'error'), ('expected', 'ResourceNotFoundException'), ('state', 'failure')])])]), description='', operation='DescribeCertificate', delay=60, max_attempts=40}

{_arg_table=None, _name='certificate-validated', _parent_name='wait', _operation_caller=<awscli.customizations.waiters.WaiterCaller object at 0x7f51d553edc0>, _lineage=[<awscli.customizations.waiters.WaiterStateCommand object at 0x7f51d553ef40>], _operation_model=OperationModel(name=DescribeCertificate), _session=<botocore.session.Session object at 0x7f51d7ea6160>}

{_arg_table=None, _name='certificate-validated', _parent_name='wait', _operation_caller=<awscli.customizations.waiters.WaiterCaller object at 0x7f51d553edc0>, _lineage=[<awscli.customizations.waiters.WaiterStateCommand object at 0x7f51d553ef40>], _operation_model=OperationModel(name=DescribeCertificate), _session=<botocore.session.Session object at 0x7f51d7ea6160>, DESCRIPTION='Wait until JMESPath query Certificate.DomainValidationOptions[].ValidationStatus returns SUCCESS for all elements when polling with ``describe-certificate``. It will poll every 60 seconds until a successful state has been reached. This will exit with a return code of 255 after 40 failed checks.'}

{_waiter_config=<botocore.waiter.SingleWaiterConfig object at 0x7f51d553ec40>}


waiter_cli_name = xform_name(waiter_name, '-')


def build_waiter_state_description(self):
        description = self._waiter_config.description
        if not description:
            description = u'Wait until '
            for acceptor in self._waiter_config.acceptors:
                if acceptor.state == 'success':
                    description += self._build_success_description(acceptor)
                    break
            description += self._build_operation_description(
                self._waiter_config.operation)
        description += self._build_polling_description(
            self._waiter_config.delay, self._waiter_config.max_attempts)
        return description
build_waiter_state_description(self=<awscli.customizations.waiters.WaiterStateDocBuilder object at 0x7f51d553ebb0>, self._waiter_config=<botocore.waiter.SingleWaiterConfig object at 0x7f51d553ec40>)

'Wait until '

'Wait until JMESPath query Certificate.DomainValidationOptions[].ValidationStatus returns SUCCESS for all elements '

'Wait until JMESPath query Certificate.DomainValidationOptions[].ValidationStatus returns SUCCESS for all elements when polling with ``describe-certificate``.'


'Wait until '


for acceptor in self._waiter_config.acceptors:

'Wait until '


def _build_success_description(self, acceptor):
        matcher = acceptor.matcher
        success_description = self.SUCCESS_DESCRIPTIONS[matcher]
        resource_description = None
        if matcher in ['path', 'pathAny', 'pathAll']:
            resource_description = u'JMESPath query %s returns ' % \
                acceptor.argument
            success_description = resource_description + success_description
        full_success_description = success_description % acceptor.expected
        return full_success_description
_build_success_description(self=<awscli.customizations.waiters.WaiterStateDocBuilder object at 0x7f51d553ebb0>, acceptor={state='success', matcher='pathAll', expected='SUCCESS', argument='Certificate.DomainValidationOptions[].ValidationStatus'}, self._waiter_config=<botocore.waiter.SingleWaiterConfig object at 0x7f51d553ec40>)

'JMESPath query Certificate.DomainValidationOptions[].ValidationStatus returns %s for all elements '

'JMESPath query Certificate.DomainValidationOptions[].ValidationStatus returns '

'JMESPath query Certificate.DomainValidationOptions[].ValidationStatus returns SUCCESS for all elements '


resource_description = u'JMESPath query %s returns ' % \

'JMESPath query Certificate.DomainValidationOptions[].ValidationStatus returns '


def _transform_map(self, schema, shapes):
        structure_shape = self._populate_initial_shape(schema)
        for attribute in ['key', 'value']:
            type_name = self._json_schema_to_aws_type(schema[attribute])
            shape_name = self._shape_namer.new_shape_name(type_name)
            structure_shape[attribute] = {'shape': shape_name}
            self._transform(schema[attribute], shapes, shape_name)
        return structure_shape
_transform_map(self=<awscli.schema.SchemaTransformer object at 0x7f518738fca0>, schema={'type': 'map', 'key': {'type': 'string'}, 'value': {'type': 'string'}}, shapes={}, self._shape_namer=<awscli.schema.ShapeNameGenerator object at 0x7f518738fd30>)

{'StringType1': {'type': 'string'}, 'StringType2': {'type': 'string'}}

{'type': 'map', 'key': {'shape': 'StringType1'}}

{'type': 'map', 'key': {'shape': 'StringType1'}, 'value': {'shape': 'StringType2'}}


def new_shape_name(self, type_name):
        self._name_cache[type_name] += 1
        current_index = self._name_cache[type_name]
        return '%sType%s' % (type_name.capitalize(), current_index)
new_shape_name(self=<awscli.schema.ShapeNameGenerator object at 0x7f518738fd30>, type_name='string', self._name_cache=defaultdict(<class 'int'>, {}))

defaultdict(<class 'int'>, {'string': 1})


def _transform_list(self, schema, shapes):
        list_shape = self._populate_initial_shape(schema)
        member_type = self._json_schema_to_aws_type(schema['items'])
        member_shape_name = self._shape_namer.new_shape_name(member_type)
        list_shape['member'] = {'shape': member_shape_name}
        self._transform(schema['items'], shapes, member_shape_name)
        return list_shape
_transform_list(self=<awscli.schema.SchemaTransformer object at 0x7f518738fe80>, schema={'type': 'array', 'items': {'type': 'string'}}, shapes={}, self._shape_namer=<awscli.schema.ShapeNameGenerator object at 0x7f518738f100>)

{'type': 'list', 'member': {'shape': 'StringType1'}}


list_shape['member'] = {'shape': member_shape_name}

{'type': 'list', 'member': {'shape': 'StringType1'}}


def flatten_args(self, command, argument_table, **kwargs):
        for name, argument in self.configs[command.name].items():
            argument_from_table = argument_table[name]
            overwritten = False
            LOG.debug('Flattening {0} argument {1} into {2}'.format(
                command.name, name,
                ', '.join([v['name'] for k, v in argument['flatten'].items()])
            ))
            for sub_argument, new_config in argument['flatten'].items():
                config = new_config.copy()
                config['container'] = argument_from_table
                config['prop'] = sub_argument
                _arg = self._find_nested_arg(
                    argument_from_table.argument_model, sub_argument
                )
                self._merge_member_config(_arg, sub_argument, config)
                new_arg = FlattenedArgument(**config)
                argument_table[new_config['name']] = new_arg
                if name == new_config['name']:
                    overwritten = True
            if not overwritten and ('keep' not in argument or
                                    not argument['keep']):
                del argument_table[name]
flatten_args(self=<awscli.customizations.flatten.FlattenArguments object at 0x7f51d7cb2730>, command={_arg_table=None, _name='define-expression', _parent_name='cloudsearch', _operation_caller=<awscli.clidriver.CLIOperationCaller object at 0x7f5181bfc430>, _lineage=[<awscli.clidriver.ServiceCommand object at 0x7f51d7c11940>, <awscli.clidriver.ServiceOperation object at 0x7f5181bfc1f0>], _operation_model=OperationModel(name=DefineExpression), _session=<botocore.session.Session object at 0x7f51d7ea6160>}, argument_table=OrderedDict([('domain-name', <awscli.arguments.CLIArgument object at 0x7f5181b0dcd0>), ('expression', <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>)]), kwargs={'operation_model': OperationModel(name=DefineExpression), 'session': <botocore.session.Session object at 0x7f51d7ea6160>, 'event_name': 'building-argument-table.cloudsearch.define-expression'}, self.configs={'define-expression': {'expression': {'keep': False, 'flatten': OrderedDict([('ExpressionName', {'name': 'name'}), ('ExpressionValue', {'name': 'expression'})])}}, 'define-index-field': {'index-field': {'keep': False, 'flatten': OrderedDict([('IndexFieldName', {'name': 'name'}), ('IndexFieldType', {'name': 'type'}), ('IntOptions.DefaultValue', {'name': 'default-value', 'type': 'string', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.FacetEnabled', {'name': 'facet-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.SearchEnabled', {'name': 'search-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.ReturnEnabled', {'name': 'return-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.SortEnabled', {'name': 'sort-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.SourceField', {'name': 'source-field', 'type': 'string', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('TextOptions.HighlightEnabled', {'name': 'highlight-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('TextOptions.AnalysisScheme', {'name': 'analysis-scheme', 'hydrate': <function index_hydrate at 0x7f521cddd820>})])}}}, self.service_name='cloudsearch')

OrderedDict([('domain-name', <awscli.arguments.CLIArgument object at 0x7f5181b0dcd0>), ('expression', <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>), ('name', <awscli.customizations.flatten.FlattenedArgument object at 0x7f5181b0da30>)])

OrderedDict([('domain-name', <awscli.arguments.CLIArgument object at 0x7f5181b0dcd0>), ('expression', <awscli.customizations.flatten.FlattenedArgument object at 0x7f5181b0dc40>), ('name', <awscli.customizations.flatten.FlattenedArgument object at 0x7f5181b0da30>)])

{_name='expression', _serialized_name='Expression', argument_model=<StructureShape(Expression)>, _required=True, _operation_model=OperationModel(name=DefineExpression), _event_emitter=<botocore.hooks.EventAliaser object at 0x7f51d7ea6220>, _documentation='<p>A named expression that can be evaluated at search time. Can be used to sort the search results, define other expressions, or return computed information in the search results. </p>'}

{'name': 'name', 'container': <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>}

{'name': 'name', 'container': <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>, 'prop': 'ExpressionName'}

{'name': 'name', 'container': <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>, 'prop': 'ExpressionName', 'help_text': '
Names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore).
', 'required': True, 'type': 'string'}

{'name': 'expression', 'container': <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>}

{'name': 'expression', 'container': <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>, 'prop': 'ExpressionValue'}

{'name': 'expression', 'container': <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>, 'prop': 'ExpressionValue', 'help_text': '
The expression to evaluate for sorting while processing a search request. The Expression syntax is based on JavaScript expressions. For more information, see Configuring Expressions in the Amazon CloudSearch Developer Guide.
', 'required': True, 'type': 'string'}

{type='string', _container=<awscli.arguments.CLIArgument object at 0x7f5181b0dd00>, _property='ExpressionName', _hydrate=None, _hydrate_value=None, _name='name', _help='
Names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore).
', _dest=None, _default=None, _action=None, _required=True, _nargs=None, _const=None, _cli_type_name=None, _group_name=None, _positional_arg=False, _choices=[], _synopsis='', no_paramfile=False, argument_model=<StringShape(InputShape)>}

{type='string', _container=<awscli.arguments.CLIArgument object at 0x7f5181b0dd00>, _property='ExpressionValue', _hydrate=None, _hydrate_value=None, _name='expression', _help='
The expression to evaluate for sorting while processing a search request. The Expression syntax is based on JavaScript expressions. For more information, see Configuring Expressions in the Amazon CloudSearch Developer Guide.
', _dest=None, _default=None, _action=None, _required=True, _nargs=None, _const=None, _cli_type_name=None, _group_name=None, _positional_arg=False, _choices=[], _synopsis='', no_paramfile=False, argument_model=<StringShape(InputShape)>}


def _merge_member_config(self, argument, name, config):
        for member_name, member in argument.members.items():
            if member_name == name.split(SEP)[-1]:
                if 'help_text' not in config:
                    config['help_text'] = member.documentation
                if 'required' not in config:
                    config['required'] = member_name in argument.required_members
                if 'type' not in config:
                    config['type'] = member.type_name
                break
_merge_member_config(self=<awscli.customizations.flatten.FlattenArguments object at 0x7f51d7cb2730>, argument=<StructureShape(Expression)>, name='ExpressionName', config={'name': 'name', 'container': <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>, 'prop': 'ExpressionName'}, self.configs={'define-expression': {'expression': {'keep': False, 'flatten': OrderedDict([('ExpressionName', {'name': 'name'}), ('ExpressionValue', {'name': 'expression'})])}}, 'define-index-field': {'index-field': {'keep': False, 'flatten': OrderedDict([('IndexFieldName', {'name': 'name'}), ('IndexFieldType', {'name': 'type'}), ('IntOptions.DefaultValue', {'name': 'default-value', 'type': 'string', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.FacetEnabled', {'name': 'facet-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.SearchEnabled', {'name': 'search-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.ReturnEnabled', {'name': 'return-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.SortEnabled', {'name': 'sort-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('IntOptions.SourceField', {'name': 'source-field', 'type': 'string', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('TextOptions.HighlightEnabled', {'name': 'highlight-enabled', 'hydrate': <function index_hydrate at 0x7f521cddd820>}), ('TextOptions.AnalysisScheme', {'name': 'analysis-scheme', 'hydrate': <function index_hydrate at 0x7f521cddd820>})])}}}, self.service_name='cloudsearch')

{'name': 'name', 'container': <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>, 'prop': 'ExpressionName', 'help_text': '
Names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore).
'}

{'name': 'name', 'container': <awscli.arguments.CLIArgument object at 0x7f5181b0dd00>, 'prop': 'ExpressionName', 'help_text': '
Names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore).
', 'required': True}


def _detect_shape_structure(param, stack):
    if param.name in stack:
        return 'recursive'
    else:
        stack.append(param.name)
    try:
        if param.type_name in SCALAR_TYPES:
            return 'scalar'
        elif param.type_name == 'structure':
            sub_types = [_detect_shape_structure(p, stack)
                        for p in param.members.values()]
            if len(sub_types) == 1 and all(p == 'scalar' for p in sub_types):
                return 'structure(scalar)'
            elif len(sub_types) > 1 and all(p == 'scalar' for p in sub_types):
                return 'structure(scalars)'
            else:
                return 'structure(%s)' % ', '.join(sorted(set(sub_types)))
        elif param.type_name == 'list':
            return 'list-%s' % _detect_shape_structure(param.member, stack)
        elif param.type_name == 'map':
            if param.value.type_name in SCALAR_TYPES:
                return 'map-scalar'
            else:
                return 'map-%s' % _detect_shape_structure(param.value, stack)
    finally:
        stack.pop()
_detect_shape_structure(param=<StringShape(String)>, stack=[])


def hoist(self, session, argument_table, **kwargs):
        help_text = ZIP_DOCSTRING.format(param_type=self._name)
        argument_table['zip-file'] = ZipFileArgument(
            'zip-file', help_text=help_text, cli_type_name='blob',
            serialized_name=self._serialized_name
        )
        argument = argument_table[self._name]
        model = copy.deepcopy(argument.argument_model)
        del model.members['ZipFile']
        argument_table[self._name] = ReplacedZipFileArgument(
            name=self._name,
            argument_model=model,
            operation_model=argument._operation_model,
            is_required=False,
            event_emitter=session.get_component('event_emitter'),
            serialized_name=self._serialized_name,
        )
hoist(self=<awscli.customizations.awslambda.ZipFileArgumentHoister object at 0x7f51d7cb26a0>, session={_original_handler=<botocore.hooks.HierarchicalEmitter object at 0x7f51d7ea6250>, _events=<botocore.hooks.EventAliaser object at 0x7f51d7ea6220>, user_agent_name='aws-cli', user_agent_version='1.32.28', user_agent_extra='botocore/1.34.77', _profile=None, _config={'profiles': {}}, _credentials=None, _auth_token=None, _profile_map={}, _session_instance_vars={}, _client_config=None, _last_client_region_used=None, _components=<botocore.session.ComponentLocator object at 0x7f51d7ea6310>, _internal_components=<botocore.session.ComponentLocator object at 0x7f51d7ea63a0>, session_var_map=<botocore.session.SessionVarDict object at 0x7f51d7e4b5b0>}, argument_table=OrderedDict([('function-name', <awscli.arguments.CLIArgument object at 0x7f5090604790>), ('runtime', <awscli.arguments.CLIArgument object at 0x7f50906047c0>), ('role', <awscli.arguments.CLIArgument object at 0x7f50906048e0>), ('handler', <awscli.arguments.CLIArgument object at 0x7f5090604580>), ('code', <awscli.arguments.CLIArgument object at 0x7f50906049d0>), ('description', <awscli.arguments.CLIArgument object at 0x7f5090604880>), ('timeout', <awscli.arguments.CLIArgument object at 0x7f5090604ac0>), ('memory-size', <awscli.arguments.CLIArgument object at 0x7f5090604bb0>), ('publish', <awscli.arguments.BooleanArgument object at 0x7f5090604a60>), ('no-publish', <awscli.arguments.BooleanArgument object at 0x7f5090604b20>), ('vpc-config', <awscli.arguments.CLIArgument object at 0x7f5090604a00>), ('package-type', <awscli.arguments.CLIArgument object at 0x7f5090604a90>), ('dead-letter-config', <awscli.arguments.CLIArgument object at 0x7f5090604b80>), ('environment', <awscli.arguments.CLIArgument object at 0x7f5090604c70>), ('kms-key-arn', <awscli.arguments.CLIArgument object at 0x7f5090604c40>), ('tracing-config', <awscli.arguments.CLIArgument object at 0x7f50906049a0>), ('tags', <awscli.arguments.CLIArgument object at 0x7f5090604d60>), ('layers', <awscli.arguments.ListArgument object at 0x7f5090604970>), ('file-system-configs', <awscli.arguments.ListArgument object at 0x7f5090604d00>), ('image-config', <awscli.arguments.CLIArgument object at 0x7f5090604df0>), ('code-signing-config-arn', <awscli.arguments.CLIArgument object at 0x7f5090604e20>), ('architectures', <awscli.arguments.ListArgument object at 0x7f5090604e50>), ('ephemeral-storage', <awscli.arguments.CLIArgument object at 0x7f5090604c10>), ('snap-start', <awscli.arguments.CLIArgument object at 0x7f5090604d30>), ('logging-config', <awscli.arguments.CLIArgument object at 0x7f5090604d90>)]), kwargs={'operation_model': OperationModel(name=CreateFunction), 'command': <awscli.clidriver.ServiceOperation object at 0x7f5090e6c700>, 'event_name': 'building-argument-table.lambda.create-function'}, self._name='code', self._serialized_name='Code')

'
The path to the zip file of the code you are uploading. Specify --zip-file or --code, but not both. Example: fileb://code.zip
'

OrderedDict([('function-name', <awscli.arguments.CLIArgument object at 0x7f5090604790>), ('runtime', <awscli.arguments.CLIArgument object at 0x7f50906047c0>), ('role', <awscli.arguments.CLIArgument object at 0x7f50906048e0>), ('handler', <awscli.arguments.CLIArgument object at 0x7f5090604580>), ('code', <awscli.arguments.CLIArgument object at 0x7f50906049d0>), ('description', <awscli.arguments.CLIArgument object at 0x7f5090604880>), ('timeout', <awscli.arguments.CLIArgument object at 0x7f5090604ac0>), ('memory-size', <awscli.arguments.CLIArgument object at 0x7f5090604bb0>), ('publish', <awscli.arguments.BooleanArgument object at 0x7f5090604a60>), ('no-publish', <awscli.arguments.BooleanArgument object at 0x7f5090604b20>), ('vpc-config', <awscli.arguments.CLIArgument object at 0x7f5090604a00>), ('package-type', <awscli.arguments.CLIArgument object at 0x7f5090604a90>), ('dead-letter-config', <awscli.arguments.CLIArgument object at 0x7f5090604b80>), ('environment', <awscli.arguments.CLIArgument object at 0x7f5090604c70>), ('kms-key-arn', <awscli.arguments.CLIArgument object at 0x7f5090604c40>), ('tracing-config', <awscli.arguments.CLIArgument object at 0x7f50906049a0>), ('tags', <awscli.arguments.CLIArgument object at 0x7f5090604d60>), ('layers', <awscli.arguments.ListArgument object at 0x7f5090604970>), ('file-system-configs', <awscli.arguments.ListArgument object at 0x7f5090604d00>), ('image-config', <awscli.arguments.CLIArgument object at 0x7f5090604df0>), ('code-signing-config-arn', <awscli.arguments.CLIArgument object at 0x7f5090604e20>), ('architectures', <awscli.arguments.ListArgument object at 0x7f5090604e50>), ('ephemeral-storage', <awscli.arguments.CLIArgument object at 0x7f5090604c10>), ('snap-start', <awscli.arguments.CLIArgument object at 0x7f5090604d30>), ('logging-config', <awscli.arguments.CLIArgument object at 0x7f5090604d90>), ('zip-file', <awscli.customizations.awslambda.ZipFileArgument object at 0x7f5090604cd0>)])

OrderedDict([('function-name', <awscli.arguments.CLIArgument object at 0x7f5090604790>), ('runtime', <awscli.arguments.CLIArgument object at 0x7f50906047c0>), ('role', <awscli.arguments.CLIArgument object at 0x7f50906048e0>), ('handler', <awscli.arguments.CLIArgument object at 0x7f5090604580>), ('code', <awscli.customizations.awslambda.ReplacedZipFileArgument object at 0x7f5090604af0>), ('description', <awscli.arguments.CLIArgument object at 0x7f5090604880>), ('timeout', <awscli.arguments.CLIArgument object at 0x7f5090604ac0>), ('memory-size', <awscli.arguments.CLIArgument object at 0x7f5090604bb0>), ('publish', <awscli.arguments.BooleanArgument object at 0x7f5090604a60>), ('no-publish', <awscli.arguments.BooleanArgument object at 0x7f5090604b20>), ('vpc-config', <awscli.arguments.CLIArgument object at 0x7f5090604a00>), ('package-type', <awscli.arguments.CLIArgument object at 0x7f5090604a90>), ('dead-letter-config', <awscli.arguments.CLIArgument object at 0x7f5090604b80>), ('environment', <awscli.arguments.CLIArgument object at 0x7f5090604c70>), ('kms-key-arn', <awscli.arguments.CLIArgument object at 0x7f5090604c40>), ('tracing-config', <awscli.arguments.CLIArgument object at 0x7f50906049a0>), ('tags', <awscli.arguments.CLIArgument object at 0x7f5090604d60>), ('layers', <awscli.arguments.ListArgument object at 0x7f5090604970>), ('file-system-configs', <awscli.arguments.ListArgument object at 0x7f5090604d00>), ('image-config', <awscli.arguments.CLIArgument object at 0x7f5090604df0>), ('code-signing-config-arn', <awscli.arguments.CLIArgument object at 0x7f5090604e20>), ('architectures', <awscli.arguments.ListArgument object at 0x7f5090604e50>), ('ephemeral-storage', <awscli.arguments.CLIArgument object at 0x7f5090604c10>), ('snap-start', <awscli.arguments.CLIArgument object at 0x7f5090604d30>), ('logging-config', <awscli.arguments.CLIArgument object at 0x7f5090604d90>), ('zip-file', <awscli.customizations.awslambda.ZipFileArgument object at 0x7f5090604cd0>)])

{_name='code', _serialized_name='Code', argument_model=<StructureShape(FunctionCode)>, _required=True, _operation_model=OperationModel(name=CreateFunction), _event_emitter=<botocore.hooks.EventAliaser object at 0x7f51d7ea6220>, _documentation='
The code for the function.
'}


def modify_revision_arguments(argument_table, session, **kwargs):
    s3_model = create_argument_model_from_schema(S3_LOCATION_SCHEMA)
    argument_table[S3_LOCATION_ARG_DESCRIPTION['name']] = (
        S3LocationArgument(
            argument_model=s3_model,
            session=session,
            **S3_LOCATION_ARG_DESCRIPTION
        )
    )
    github_model = create_argument_model_from_schema(GITHUB_LOCATION_SCHEMA)
    argument_table[GITHUB_LOCATION_ARG_DESCRIPTION['name']] = (
        GitHubLocationArgument(
            argument_model=github_model,
            session=session,
            **GITHUB_LOCATION_ARG_DESCRIPTION
        )
    )
    argument_table['revision'].required = False
modify_revision_arguments(argument_table=OrderedDict([('application-name', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf070>), ('deployment-group-name', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf2b0>), ('revision', <awscli.arguments.CLIArgument object at 0x7f4f8a5bfac0>), ('deployment-config-name', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf130>), ('description', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf400>), ('ignore-application-stop-failures', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bf910>), ('no-ignore-application-stop-failures', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bfa00>), ('target-instances', <awscli.arguments.CLIArgument object at 0x7f4f8a5bfb50>), ('auto-rollback-configuration', <awscli.arguments.CLIArgument object at 0x7f4f8a5bfb20>), ('update-outdated-instances-only', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bfa90>), ('no-update-outdated-instances-only', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bfc70>), ('file-exists-behavior', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf040>), ('override-alarm-configuration', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf8b0>)]), session={_original_handler=<botocore.hooks.HierarchicalEmitter object at 0x7f51d7ea6250>, _events=<botocore.hooks.EventAliaser object at 0x7f51d7ea6220>, user_agent_name='aws-cli', user_agent_version='1.32.28', user_agent_extra='botocore/1.34.77', _profile=None, _config={'profiles': {}}, _credentials=None, _auth_token=None, _profile_map={}, _session_instance_vars={}, _client_config=None, _last_client_region_used=None, _components=<botocore.session.ComponentLocator object at 0x7f51d7ea6310>, _internal_components=<botocore.session.ComponentLocator object at 0x7f51d7ea63a0>, session_var_map=<botocore.session.SessionVarDict object at 0x7f51d7e4b5b0>}, kwargs={'operation_model': OperationModel(name=CreateDeployment), 'command': <awscli.clidriver.ServiceOperation object at 0x7f4f8aac5550>, 'event_name': 'building-argument-table.deploy.create-deployment'})

OrderedDict([('application-name', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf070>), ('deployment-group-name', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf2b0>), ('revision', <awscli.arguments.CLIArgument object at 0x7f4f8a5bfac0>), ('deployment-config-name', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf130>), ('description', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf400>), ('ignore-application-stop-failures', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bf910>), ('no-ignore-application-stop-failures', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bfa00>), ('target-instances', <awscli.arguments.CLIArgument object at 0x7f4f8a5bfb50>), ('auto-rollback-configuration', <awscli.arguments.CLIArgument object at 0x7f4f8a5bfb20>), ('update-outdated-instances-only', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bfa90>), ('no-update-outdated-instances-only', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bfc70>), ('file-exists-behavior', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf040>), ('override-alarm-configuration', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf8b0>), ('s3-location', <awscli.customizations.codedeploy.locationargs.S3LocationArgument object at 0x7f4f8a5bfb80>)])

OrderedDict([('application-name', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf070>), ('deployment-group-name', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf2b0>), ('revision', <awscli.arguments.CLIArgument object at 0x7f4f8a5bfac0>), ('deployment-config-name', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf130>), ('description', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf400>), ('ignore-application-stop-failures', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bf910>), ('no-ignore-application-stop-failures', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bfa00>), ('target-instances', <awscli.arguments.CLIArgument object at 0x7f4f8a5bfb50>), ('auto-rollback-configuration', <awscli.arguments.CLIArgument object at 0x7f4f8a5bfb20>), ('update-outdated-instances-only', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bfa90>), ('no-update-outdated-instances-only', <awscli.arguments.BooleanArgument object at 0x7f4f8a5bfc70>), ('file-exists-behavior', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf040>), ('override-alarm-configuration', <awscli.arguments.CLIArgument object at 0x7f4f8a5bf8b0>), ('s3-location', <awscli.customizations.codedeploy.locationargs.S3LocationArgument object at 0x7f4f8a5bfb80>), ('github-location', <awscli.customizations.codedeploy.locationargs.GitHubLocationArgument object at 0x7f4f8a5bfd60>)])


def test_soft_jaccard_score(y_true, y_pred, expected, eps):
    y_true = torch.tensor(y_true, dtype=torch.float32)
    y_pred = torch.tensor(y_pred, dtype=torch.float32)
    actual = F.soft_jaccard_score(y_pred, y_true, eps=eps)
    assert float(actual) == pytest.approx(expected, eps)
test_soft_jaccard_score(y_true=[1, 1, 1, 1], y_pred=[1, 1, 1, 1], expected=1.0, eps=1e-05)


y_pred = torch.tensor(y_pred, dtype=torch.float32)


actual = F.soft_jaccard_score(y_pred, y_true, eps=eps)


assert float(actual) == pytest.approx(expected, eps)


def test_soft_jaccard_score_2(y_true, y_pred, expected, eps):
    y_true = torch.tensor(y_true, dtype=torch.float32)
    y_pred = torch.tensor(y_pred, dtype=torch.float32)
    actual = F.soft_jaccard_score(y_pred, y_true, dims=[1], eps=eps)
    actual = actual.mean()
    assert float(actual) == pytest.approx(expected, eps)
test_soft_jaccard_score_2(y_true=[[1, 1, 0, 0], [0, 0, 1, 1]], y_pred=[[1, 1, 0, 0], [0, 0, 1, 1]], expected=1.0, eps=1e-05)


actual = F.soft_jaccard_score(y_pred, y_true, dims=[1], eps=eps)


def test_soft_dice_score(y_true, y_pred, expected, eps):
    y_true = torch.tensor(y_true, dtype=torch.float32)
    y_pred = torch.tensor(y_pred, dtype=torch.float32)
    actual = F.soft_dice_score(y_pred, y_true, eps=eps)
    assert float(actual) == pytest.approx(expected, eps)
test_soft_dice_score(y_true=[1, 1, 1, 1], y_pred=[1, 1, 1, 1], expected=1.0, eps=1e-05)


actual = F.soft_dice_score(y_pred, y_true, eps=eps)


def test_soft_tversky_score(y_true, y_pred, expected, eps, alpha, beta):
    y_true = torch.tensor(y_true, dtype=torch.float32)
    y_pred = torch.tensor(y_pred, dtype=torch.float32)
    actual = F.soft_tversky_score(y_pred, y_true, eps=eps, alpha=alpha, beta=beta)
    assert float(actual) == pytest.approx(expected, eps)
test_soft_tversky_score(y_true=[1, 1, 1, 1], y_pred=[1, 1, 1, 1], expected=1.0, eps=1e-05, alpha=0.5, beta=0.5)


actual = F.soft_tversky_score(y_pred, y_true, eps=eps, alpha=alpha, beta=beta)


def _get_channels(self, mode, width_mult):
        if mode == "small":
            channels = [16, 16, 24, 48, 576]
        else:
            channels = [16, 24, 40, 112, 960]
        channels = [
            3,
        ] + [_make_divisible(x * width_mult) for x in channels]
        return tuple(channels)
_get_channels(self=MobileNetV3Encoder(), mode='large', width_mult=0.75, self._backward_hooks=OrderedDict(), self._backward_pre_hooks=OrderedDict(), self._buffers=OrderedDict(), self._depth=3, self._forward_hooks=OrderedDict(), self._forward_hooks_always_called=OrderedDict(), self._forward_hooks_with_kwargs=OrderedDict(), self._forward_pre_hooks=OrderedDict(), self._forward_pre_hooks_with_kwargs=OrderedDict(), self._is_full_backward_hook=None, self._load_state_dict_post_hooks=OrderedDict(), self._load_state_dict_pre_hooks=OrderedDict(), self._mode='large', self._modules=OrderedDict(), self._non_persistent_buffers_set=set(), self._parameters=OrderedDict(), self._state_dict_hooks=OrderedDict(), self._state_dict_pre_hooks=OrderedDict(), self.training=True)


def _conv_bn(self, kernel_size: int, padding: int) -> nn.Sequential:
        mod_list = nn.Sequential()
        mod_list.add_module(
            "conv",
            nn.Conv2d(
                in_channels=self.in_channels,
                out_channels=self.out_channels,
                kernel_size=kernel_size,
                stride=self.stride,
                padding=padding,
                groups=self.groups,
                bias=False,
            ),
        )
        mod_list.add_module("bn", nn.BatchNorm2d(num_features=self.out_channels))
        return mod_list
_conv_bn(self=MobileOneBlock(  (se): Identity()  (activation): ReLU()), kernel_size=3, padding=1, self._backward_hooks=OrderedDict(), self._backward_pre_hooks=OrderedDict(), self._buffers=OrderedDict(), self._forward_hooks=OrderedDict(), self._forward_hooks_always_called=OrderedDict(), self._forward_hooks_with_kwargs=OrderedDict(), self._forward_pre_hooks=OrderedDict(), self._forward_pre_hooks_with_kwargs=OrderedDict(), self._is_full_backward_hook=None, self._load_state_dict_post_hooks=OrderedDict(), self._load_state_dict_pre_hooks=OrderedDict(), self._modules=OrderedDict([('se', Identity()), ('activation', ReLU())]), self._non_persistent_buffers_set=set(), self._parameters=OrderedDict(), self._state_dict_hooks=OrderedDict(), self._state_dict_pre_hooks=OrderedDict(), self.groups=1, self.in_channels=3, self.inference_mode=False, self.kernel_size=3, self.num_conv_branches=1, self.out_channels=48, self.rbr_skip=None, self.stride=2, self.training=True)

Sequential(  (conv): Conv2d(3, 48, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False))

Sequential(  (conv): Conv2d(3, 48, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)  (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True))


Sequential(  (conv): Conv2d(3, 48, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False))


def _make_stage(self, planes: int, num_blocks: int, num_se_blocks: int) -> nn.Sequential:
        strides = [2] + [1] * (num_blocks - 1)
        blocks = []
        for ix, stride in enumerate(strides):
            use_se = False
            if num_se_blocks > num_blocks:
                raise ValueError("Number of SE blocks cannot " "exceed number of layers.")
            if ix >= (num_blocks - num_se_blocks):
                use_se = True
            blocks.append(
                MobileOneBlock(
                    in_channels=self.in_planes,
                    out_channels=self.in_planes,
                    kernel_size=3,
                    stride=stride,
                    padding=1,
                    groups=self.in_planes,
                    inference_mode=self.inference_mode,
                    use_se=use_se,
                    num_conv_branches=self.num_conv_branches,
                )
            )
            blocks.append(
                MobileOneBlock(
                    in_channels=self.in_planes,
                    out_channels=planes,
                    kernel_size=1,
                    stride=1,
                    padding=0,
                    groups=1,
                    inference_mode=self.inference_mode,
                    use_se=use_se,
                    num_conv_branches=self.num_conv_branches,
                )
            )
            self.in_planes = planes
            self.cur_layer_idx += 1
        return nn.Sequential(*blocks)
_make_stage(self=MobileOne(  (stage0): MobileOneBlock(    (se): Identity()    (activation): ReLU()    (rbr_conv): ModuleList(      (0): Sequential(        (conv): Conv2d(3, 48, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)        (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)      )    )    (rbr_scale): Sequential(      (conv): Conv2d(3, 48, kernel_size=(1, 1), stride=(2, 2), bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )), planes=48, num_blocks=2, num_se_blocks=0, self._backward_hooks=OrderedDict(), self._backward_pre_hooks=OrderedDict(), self._buffers=OrderedDict(), self._depth=3, self._forward_hooks=OrderedDict(), self._forward_hooks_always_called=OrderedDict(), self._forward_hooks_with_kwargs=OrderedDict(), self._forward_pre_hooks=OrderedDict(), self._forward_pre_hooks_with_kwargs=OrderedDict(), self._in_channels=3, self._is_full_backward_hook=None, self._load_state_dict_post_hooks=OrderedDict(), self._load_state_dict_pre_hooks=OrderedDict(), self._modules=OrderedDict([('stage0', MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_conv): ModuleList(    (0): Sequential(      (conv): Conv2d(3, 48, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )  (rbr_scale): Sequential(    (conv): Conv2d(3, 48, kernel_size=(1, 1), stride=(2, 2), bias=False)    (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  )))]), self._non_persistent_buffers_set=set(), self._out_channels=(3, 48, 48, 128, 256, 1024), self._parameters=OrderedDict(), self._state_dict_hooks=OrderedDict(), self._state_dict_pre_hooks=OrderedDict(), self.cur_layer_idx=1, self.in_planes=48, self.inference_mode=False, self.num_conv_branches=4, self.training=True, self.use_se=False)

[MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), groups=48, bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )  (rbr_scale): Sequential(    (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(2, 2), groups=48, bias=False)    (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  ))]

[MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), groups=48, bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )  (rbr_scale): Sequential(    (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(2, 2), groups=48, bias=False)    (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  )), MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_skip): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(1, 1), bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  ))]

[MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), groups=48, bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )  (rbr_scale): Sequential(    (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(2, 2), groups=48, bias=False)    (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  )), MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_skip): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(1, 1), bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )), MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_skip): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=48, bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )  (rbr_scale): Sequential(    (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(1, 1), groups=48, bias=False)    (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  ))]

[MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), groups=48, bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )  (rbr_scale): Sequential(    (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(2, 2), groups=48, bias=False)    (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  )), MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_skip): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(1, 1), bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )), MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_skip): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=48, bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  )  (rbr_scale): Sequential(    (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(1, 1), groups=48, bias=False)    (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  )), MobileOneBlock(  (se): Identity()  (activation): ReLU()  (rbr_skip): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)  (rbr_conv): ModuleList(    (0-3): 4 x Sequential(      (conv): Conv2d(48, 48, kernel_size=(1, 1), stride=(1, 1), bias=False)      (bn): BatchNorm2d(48, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)    )  ))]


def overloaded_constants(type_):
    typename = type.__name__
    if not typename.endswith('s'):
        typename += 's'
    return type(
        "overloaded_" + typename,
        (_ConstantTransformerBase,),
        {'_type': type_, '__doc__': _format_constant_docstring(type_)},
    )
overloaded_constants(type_=<class 'bytes'>)


def load_translation(self) -> "I18N":
        try:
            dir_path = os.path.dirname(os.path.realpath(__file__))
            prompts_path = os.path.join(
                dir_path, f"../translations/{self.language}.json"
            )
            with open(prompts_path, "r") as f:
                self._translations = json.load(f)
        except FileNotFoundError:
            raise ValidationError(
                f"Trasnlation file for language '{self.language}' not found."
            )
        except json.JSONDecodeError:
            raise ValidationError(f"Error decoding JSON from the prompts file.")
        return self
load_translation(self=I18N(language='en'), self.__dict__={'language': 'en'}, self.__pydantic_extra__=None, self.__pydantic_fields_set__=set(), self.__pydantic_private__={}, self.language='en')

{'_translations': {'slices': {'observation': '\nObservation', 'task': 'Begin! This is VERY important to you, your job depends on it!\n\nCurrent Task: {input}', 'memory': 'This is the summary of your work so far:\n{chat_history}', 'role_playing': 'You are {role}.\n{backstory}\n\nYour personal goal is: {goal}', 'tools': 'TOOLS:\n------\nYou have access to only the following tools:\n\n{tools}\n\nTo use a tool, please use the exact following format:\n\n```\nThought: Do I need to use a tool? Yes\nAction: the action to take, should be one of [{tool_names}], just the name.\nAction Input: the input to the action\nObservation: the result of the action\n```\n\nWhen you have a response for your task, or if you do not need to use a tool, you MUST use the format:\n\n```\nThought: Do I need to use a tool? No\nFinal Answer: [your response here]', 'task_with_context': "{task}\nThis is the context you're working with:\n{context}"}, 'errors': {'used_too_many_tools': "I've used too many tools for this task. I'm going to give you my absolute BEST Final answer now and not use any more tools.", 'agent_tool_missing_param': '\nError executing tool. Missing exact 3 pipe (|) separated values. For example, `coworker|task|context`. I need to make sure to pass context as context.\n', 'agent_tool_unexsiting_coworker': '\nError executing tool. Co-worker mentioned on the Action Input not found, it must to be one of the following options: {coworkers}.\n', 'task_repeated_usage': "I just used the {tool} tool with input {tool_input}. So I already know the result of that and don't need to use it now.\n"}, 'tools': {'delegate_work': 'Useful to delegate a specific task to one of the following co-workers: {coworkers}.\nThe input to this tool should be a pipe (|) separated text of length 3 (three), representing the co-worker you want to ask it to (one of the options), the task and all actual context you have for the task.\nFor example, `coworker|task|context`.', 'ask_question': 'Useful to ask a question, opinion or take from on of the following co-workers: {coworkers}.\nThe input to this tool should be a pipe (|) separated text of length 3 (three), representing the co-worker you want to ask it to (one of the options), the question and all actual context you have for the question.\n For example, `coworker|question|context`.'}}}


{'_translations': {'slices': {'observation': '\nObservation', 'task': 'Begin! This is VERY important to you, your job depends on it!\n\nCurrent Task: {input}', 'memory': 'This is the summary of your work so far:\n{chat_history}', 'role_playing': 'You are {role}.\n{backstory}\n\nYour personal goal is: {goal}', 'tools': 'TOOLS:\n------\nYou have access to only the following tools:\n\n{tools}\n\nTo use a tool, please use the exact following format:\n\n```\nThought: Do I need to use a tool? Yes\nAction: the action to take, should be one of [{tool_names}], just the name.\nAction Input: the input to the action\nObservation: the result of the action\n```\n\nWhen you have a response for your task, or if you do not need to use a tool, you MUST use the format:\n\n```\nThought: Do I need to use a tool? No\nFinal Answer: [your response here]', 'task_with_context': "{task}\nThis is the context you're working with:\n{context}"}, 'errors': {'used_too_many_tools': "I've used too many tools for this task. I'm going to give you my absolute BEST Final answer now and not use any more tools.", 'agent_tool_missing_param': '\nError executing tool. Missing exact 3 pipe (|) separated values. For example, `coworker|task|context`. I need to make sure to pass context as context.\n', 'agent_tool_unexsiting_coworker': '\nError executing tool. Co-worker mentioned on the Action Input not found, it must to be one of the following options: {coworkers}.\n', 'task_repeated_usage': "I just used the {tool} tool with input {tool_input}. So I already know the result of that and don't need to use it now.\n"}, 'tools': {'delegate_work': 'Useful to delegate a specific task to one of the following co-workers: {coworkers}.\nThe input to this tool should be a pipe (|) separated text of length 3 (three), representing the co-worker you want to ask it to (one of the options), the task and all actual context you have for the task.\nFor example, `coworker|task|context`.', 'ask_question': 'Useful to ask a question, opinion or take from on of the following co-workers: {coworkers}.\nThe input to this tool should be a pipe (|) separated text of length 3 (three), representing the co-worker you want to ask it to (one of the options), the question and all actual context you have for the question.\n For example, `coworker|question|context`.'}}}


def parse(lines):
    info = []
    for line in lines:
        if not line.strip():
            continue
        raw_info = parse_line(line)
        if raw_info is not None:
            info.append(raw_info)
    return info
parse(lines=['lrwxrwxrwx    1 0        0              19 Jan 18  2006 debian -> ./pub/mirror/debian', 'drwxr-xr-x   10 0        0            4096 Aug 03 09:21 debian-archive', 'lrwxrwxrwx    1 0        0              27 Nov 30  2015 debian-backports -> pub/mirror/debian-backports', 'drwxr-xr-x   12 0        0            4096 Sep 29 13:13 pub', '-rw-r--r--    1 0        0              26 Mar 04  2010 robots.txt', 'drwxr-xr-x   8 foo      bar          4096 Oct  4 09:05 test', 'drwxr-xr-x   2 foo-user foo-group         0 Jan  5 11:59 240485'])

{'basic': {'name': 'debian-backports', 'is_dir': True}, 'details': {'size': 27, 'type': 1, 'modified': 1448841600.0}, 'access': {'permissions': ['g_r', 'g_w', 'g_x', 'o_r', 'o_w', 'o_x', 'u_r', 'u_w', 'u_x'], 'user': '0', 'group': '0'}, 'ftp': {'ls': 'lrwxrwxrwx    1 0        0              27 Nov 30  2015 debian-backports -> pub/mirror/debian-backports'}}


def decode_linux(line, match):
    perms, links, uid, gid, size, mtime, name = match.groups()
    is_link = perms.startswith("l")
    is_dir = perms.startswith("d") or is_link
    if is_link:
        name, _, _link_name = name.partition("->")
        name = name.strip()
        _link_name = _link_name.strip()
    permissions = Permissions.parse(perms[1:])
    mtime_epoch = _parse_time(mtime)
    name = unicodedata.normalize("NFC", name)
    raw_info = {
        "basic": {"name": name, "is_dir": is_dir},
        "details": {
            "size": int(size),
            "type": int(ResourceType.directory if is_dir else ResourceType.file),
        },
        "access": {"permissions": permissions.dump()},
        "ftp": {"ls": line},
    }
    access = raw_info["access"]
    details = raw_info["details"]
    if mtime_epoch is not None:
        details["modified"] = mtime_epoch
    access["user"] = uid
    access["group"] = gid
    return raw_info
decode_linux(line='lrwxrwxrwx    1 0        0              19 Jan 18  2006 debian -> ./pub/mirror/debian', match=<re.Match object; span=(0, 85), match='lrwxrwxrwx    1 0        0              19 Jan 18>)

{'basic': {'name': 'debian', 'is_dir': True}, 'details': {'size': 19, 'type': 1}, 'access': {'permissions': ['g_r', 'g_w', 'g_x', 'o_r', 'o_w', 'o_x', 'u_r', 'u_w', 'u_x']}, 'ftp': {'ls': 'lrwxrwxrwx    1 0        0              19 Jan 18  2006 debian -> ./pub/mirror/debian'}}


is_dir = perms.startswith("d") or is_link


name, _, _link_name = name.partition("->")


def _parse_time(t):
    t = " ".join(token.strip() for token in t.lower().split(" "))
    try:
        try:
            _t = time.strptime(t, "%b %d %Y")
        except ValueError:
            _t = time.strptime(t, "%b %d %H:%M")
    except ValueError:
        return None
    year = _t.tm_year if _t.tm_year != 1900 else time.localtime().tm_year
    month = _t.tm_mon
    day = _t.tm_mday
    hour = _t.tm_hour
    minutes = _t.tm_min
    dt = datetime.datetime(year, month, day, hour, minutes, tzinfo=UTC)
    epoch_time = (dt - epoch_dt).total_seconds()
    return epoch_time
_parse_time(t='Jan 18  2006')

time.struct_time(tm_year=2006, tm_mon=1, tm_mday=18, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=2, tm_yday=18, tm_isdst=-1)

datetime.datetime(2006, 1, 18, 0, 0, tzinfo=<UTC>)


def _parse_facts(cls, line):
        name = None
        facts = {}
        for fact in line.split(";"):
            key, sep, value = fact.partition("=")
            if sep:
                key = key.strip().lower()
                value = value.strip()
                facts[key] = value
            else:
                name = basename(fact.rstrip("/").strip())
        return name if name not in (".", "..") else None, facts
_parse_facts(cls=<class 'fs.ftpfs.FTPFS'>, line='create=19740705000000;modify=19740705000000; /foo')


def _transform_column(col_name, col_obj):
            column_dict[col_name] = col_obj
            if col_obj.primary_key:
                primary_keys[col_name] = col_obj
            col_obj.set_column_name(col_name)
            attrs[col_name] = ColumnDescriptor(col_obj)
_transform_column(col_name='partition', col_obj={partition_key=True, primary_key=True, index=False, db_field=None, required=False, clustering_order=None, discriminator_column=False, column_name=None, static=False, value=None, position=0}, attrs={'__module__': 'tests.integration.cqlengine.columns.test_container_columns', '__qualname__': 'TestSetModel', 'partition': <cassandra.cqlengine.columns.UUID object at 0x7f392b9a02b0>, 'int_set': <cassandra.cqlengine.columns.Set object at 0x7f392b9a0670>, 'text_set': <cassandra.cqlengine.columns.Set object at 0x7f392b9a0460>, '__abstract__': False, '__discriminator_value__': None, '__default_ttl__': None}, column_dict=OrderedDict(), primary_keys=OrderedDict())

{partition_key=True, primary_key=True, index=False, db_field=None, required=False, clustering_order=None, discriminator_column=False, column_name='partition', static=False, value=None, position=0}

{'__module__': 'tests.integration.cqlengine.columns.test_container_columns', '__qualname__': 'TestSetModel', 'partition': <cassandra.cqlengine.models.ColumnDescriptor object at 0x7f392b9a0850>, 'int_set': <cassandra.cqlengine.columns.Set object at 0x7f392b9a0670>, 'text_set': <cassandra.cqlengine.columns.Set object at 0x7f392b9a0460>, '__abstract__': False, '__discriminator_value__': None, '__default_ttl__': None}

OrderedDict([('partition', <cassandra.cqlengine.columns.UUID object at 0x7f392b9a02b0>)])


def _insert(self, key, value):
        flat_key = self._serialize_key(key)
        i = self._index.get(flat_key, -1)
        if i >= 0:
            self._items[i] = (key, value)
        else:
            self._items.append((key, value))
            self._index[flat_key] = len(self._items) - 1
_insert(self=OrderedMapSerializedKey([]), key='みbob', value=199)


self._index[flat_key] = len(self._items) - 1


def _raw_column_family_name(cls):
        if not cls._table_name:
            if cls.__table_name__:
                cls._table_name = cls.__table_name__.lower()
            else:
                if cls._is_polymorphic and not cls._is_polymorphic_base:
                    cls._table_name = cls._polymorphic_base._raw_column_family_name()
                else:
                    camelcase = re.compile(r'([a-z])([A-Z])')
                    ccase = lambda s: camelcase.sub(lambda v: '{0}_{1}'.format(v.group(1), v.group(2).lower()), s)
                    cf_name = ccase(cls.__name__)
                    cf_name = cf_name[-48:]
                    cf_name = cf_name.lower()
                    cf_name = re.sub(r'^_+', '', cf_name)
                    cls._table_name = cf_name
        return cls._table_name
_raw_column_family_name(cls=<class 'tests.integration.cqlengine.columns.test_validation.TestDatetime.DatetimeTest'>)

<function BaseModel._raw_column_family_name.<locals>.<lambda> at 0x7f3928251700>


def setval(self, val):
        self.value = val
setval(self=<cassandra.cqlengine.columns.BaseValueManager object at 0x7f3928258d00>, val=UUID('075f961f-ee63-45f5-ae73-f5a8f0ec8072'), self.column=<cassandra.cqlengine.columns.UUID object at 0x7f392baa7580>, self.explicit=False, self.instance=IntegerTest(test_id=None, value=None), self.previous_value=None, self.value=None)


def type_name(cls):
        if cls.__type_name__:
            type_name = cls.__type_name__.lower()
        else:
            camelcase = re.compile(r'([a-z])([A-Z])')
            ccase = lambda s: camelcase.sub(lambda v: '{0}_{1}'.format(v.group(1), v.group(2)), s)
            type_name = ccase(cls.__name__)
            type_name = type_name[-48:]
            type_name = type_name.lower()
            type_name = re.sub(r'^_+', '', type_name)
            cls.__type_name__ = type_name
        return type_name
type_name(cls=<class 'tests.integration.cqlengine.model.test_udts.UserDefinedTypeTests.test_can_create_same_udt_different_keyspaces.<locals>.User'>)

<function BaseUserType.type_name.<locals>.<lambda> at 0x7f3926826e50>


def print_status(s):
            len_s = disp_len(s)
            fp_write('\r' + s + (' ' * max(last_len[0] - len_s, 0)))
            last_len[0] = len_s
print_status(s='0it [00:00, ?it/s]', fp_write=<function tqdm.status_printer.<locals>.fp_write at 0x7fde10963040>, last_len=[0])


def __format__(self, _):
        self.format_called += 1
        return self.replace
__format__(self=<tqdm.utils.FormatReplace object at 0x7fdd6e77bcd0>, _='', self.format_called=0, self.replace='')