<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetSubFileEntryByName(self, name, case_sensitive=True):
 """Retrieves a sub file entry by name. Args: name (str):
 name of the file entry. case_sensitive (Optional[bool]):
 True if the name is case sensitive. Returns: FileEntry: a file entry or None if not available. """

    name_lower = name.lower()
    matching_sub_file_entry = None

    for sub_file_entry in self.sub_file_entries:
      if sub_file_entry.name == name:
        return sub_file_entry

      if not case_sensitive and sub_file_entry.name.lower() == name_lower:
        if not matching_sub_file_entry:
          matching_sub_file_entry = sub_file_entry

    return matching_sub_file_entry