def METHOD_NAME(self, image_obj_list, print_inclusive=False):
    '''Generate an SPDX document
    WARNING: This assumes that the list consists of one image or the base
    image and a stub image, in which case, the information in the stub
    image is not applicable in the SPDX case as it is an empty image
    object with no metadata as nothing got built.
    The whole document should be stored in a string which can be written
    to a file using the write_report function in report.py
    First convert the image object into a dictionary. The dictionary
    should be in this form:
        image:{
          origins: [...]
          layers: [
            {origins: [...],
             packages: [
               {name: package1,..origins: [...]},
               {name: package2,..origins: [...]},..],
             files: [
               {name: file1,..origins: [...]},
               {name: file2,..origins: [...]},..]}
               ...]}
    Then convert this into a flat format starting from top to bottom
    So:
        ## image
        List all the tag-values here
        make a PackageComment: <text> </text>
        ## relationships
        spdx-ref CONTAINS layer1
        spdx-ref CONTAINS layer2
        ...
        ## layer1
        List all the tag-values here
        make a PackageComment here
        ## if layer1 has files analyzed
        ### extra package info here
        ### file level information here
        ## if not then package relationships
        spdx-ref CONTAINS package1
        spdx-ref CONTAINS package2
        ....
        # layer2
        tag-values
        PackageComment
        # relationships
        spdx-ref HAS_PREREQUISITE layer1
        spdx-ref CONTAINS package3
        spdx-ref CONTAINS package4
        ....
        # package1
        tag-values
        PackageComment
        # package2
        # package3
        # package4
    Everything in Origins can be in a tag-value format as
    PackageComment: <text> </text>
    For the sake of SPDX, an image is a 'Package' which 'CONTAINS' each
    layer which is also a 'Package' which 'CONTAINS' the real Package'''
    logger.debug("Generating SPDX document...")
    report = ''
    # we still don't know how SPDX documents could represent multiple
    # images. Hence we will assume only one image is analyzed and the
    # input is a list of length 1
    image_obj = image_obj_list[0]
    template = SPDX()
    # first part is the document tag-value
    # this doesn't change at all
    report += get_document_block(image_obj) + '\n'
    # this is the image part
    # this will bring in layer and package information
    report += mhelpers.get_image_block(image_obj, template) + '\n'
    return report