def has_os_path_join(block_dets):
    """
    path = os.path.join('a', 'b')
    os.path.join('a/', 'b')
    <value>
      <Call lineno="2" col_offset="7">
        <func>
          <Attribute lineno="2" col_offset="7" type="str" attr="join">
            <value>
              <Attribute lineno="2" col_offset="7" type="str" attr="path">
                <value>
                  <Name lineno="2" col_offset="7" type="str" id="os">
    """
    os_path_join_els = block_dets.element.xpath(
        'descendant-or-self::'
        'value/Call/func/Attribute/value/Attribute/value/Name')
    if len(os_path_join_els) != 1:
        return False
    join_els = block_dets.element.xpath(
        'descendant-or-self::value/Call/func/Attribute')
    if len(join_els) != 1:
        return False
    join_el =join_els[0]
    if not join_el.get('attr') == 'join':
        return False
    path_els = block_dets.element.xpath(
        'descendant-or-self::'
        'value/Call/func/Attribute/value/Attribute')
    if len(path_els) != 1:
        return False
    path_el = path_els[0]
    if not path_el.get('attr') == 'path':
        return False
    name_els = block_dets.element.xpath(
        'descendant-or-self::'
        'value/Call/func/Attribute/value/Attribute/value/Name')
    if len(name_els) != 1:
        return False
    name_el = name_els[0]
    if not name_el.get('id') == 'os':
        return False
    return True