def get_registry_records_by_keyword(keyword=None):
portal_reg = ploneapi.portal.get_tool(name="<STR_LIT>")<EOL>found_registers = {}<EOL>for record in portal_reg.records:<EOL><INDENT>if keyword is None:<EOL><INDENT>found_registers[record] = api.get_registry_record(record)<EOL><DEDENT>elif keyword.lower() in record.lower():<EOL><INDENT>found_registers[record] = api.get_registry_record(record)<EOL><DEDENT><DEDENT>return found_registers<EOL>
Get all the registry records (names and values) whose name
     contains the specified keyword or, if keyword is None, return
     all registry items

    :param keyword: The keyword that has to be contained in the record name
    :type keyword: str or None
    :returns: Dictionary mapping the names of the found records to its values