def extract_files(self, resource):
if hasattr(resource, "<STR_LIT>"):<EOL><INDENT>files = [file for file in resource if self.can_be_extracted(file)]<EOL><DEDENT>elif os.path.isfile(resource):<EOL><INDENT>files = [resource] if self.can_be_extracted(resource) else []<EOL><DEDENT>else:<EOL><INDENT>files = self._extract_from_directory(resource)<EOL><DEDENT>return files<EOL>
:param resource str|iterable  files, a file or a directory
@return: iterable