in src/sagemaker_core/tools/resources_codegen.py [0:0]
def _fetch_shape_errors_and_doc_strings(self, operation):
operation_dict = self.operations[operation]
errors = operation_dict.get("errors", [])
shape_errors_and_docstrings = {}
if errors:
for e in errors:
error_shape = e["shape"]
error_shape_dict = self.shapes[error_shape]
error_shape_documentation = error_shape_dict.get("documentation")
if error_shape_documentation:
error_shape_documentation.strip()
shape_errors_and_docstrings[error_shape] = error_shape_documentation
sorted_keys = sorted(shape_errors_and_docstrings.keys())
return {key: shape_errors_and_docstrings[key] for key in sorted_keys}