code: def add_imported_namespace(self,
                                 namespace,
                                 imported_alias=False,
                                 imported_data_type=False,
                                 imported_annotation=False,
                                 imported_annotation_type=False):
          # type: (ApiNamespace, bool, bool, bool, bool) -> None
          
          assert self.name != namespace.name, \
              'Namespace cannot import itself.'
          reason = self._imported_namespaces.setdefault(namespace, _ImportReason())
          if imported_alias:
              reason.alias = True
          if imported_data_type:
              reason.data_type = True
          if imported_annotation:
              reason.annotation = True
          if imported_annotation_type:
              reason.annotation_type = True
docs: Keeps track of namespaces that this namespace imports.
  
          Args:
              namespace (Namespace): The imported namespace.
              imported_alias (bool): Set if this namespace references an alias
                  in the imported namespace.
              imported_data_type (bool): Set if this namespace references a
                  data type in the imported namespace.
              imported_annotation (bool): Set if this namespace references a
                  annotation in the imported namespace.
              imported_annotation_type (bool): Set if this namespace references an
                  annotation in the imported namespace, possibly indirectly (by
                  referencing an annotation elsewhere that has this type).