def islinear(doc):
    """
    Given sbol document (shallow or full) find linearness
    
    Requires
    --------
    None

    Parameters
    ----------
    doc: sbol document.Document object
        a shallow or full doc created using sbol2

    Returns
    -------
    linear: boolean
        if the file is linear True, if the file is circular (a plasmid) False
        
    Example
    -------
    file_in = "https://synbiohub.programmingbiology.org/public/UWYeast_AND_gate/plasmid_0/1/sbol"
    doc = sbol2.Document()
    doc.read(file_in)
    circular = islinear(doc)

    """
    
    linear = True
    for top_level in doc:
        if top_level.type == "http://sbols.org/v2#ComponentDefinition":    
            #create a set of types for every top_level component definition
            type_set = set(top_level.types)
            if "http://identifiers.org/so/SO:0000988" in type_set:
                linear = False
                
    return(linear)